Unauthorized after Curl

after hours and hours of finally successful installations i get the nexmo api to run and produce this:

Hi, using your key: dxxxxxx8 and secret: 0xxxxx to make a Call with Voice API.

Using application ID 'App SMS n VoiceMail' to call +49711xxxx4

Generate a JWT for App SMS n VoiceMail.

keyfile= "App SMS n VoiceMail"

This JWT authenticates you when you make a request to one of our endpoints:

eyJ0eXAiOiJxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQfrNDytEkvmNfTQXtQnlXpaR-gVg2pBEGcLMom1ziVrN_xxxxxxxxxxxx2yT67n68q-ehKeut_Pg_xxxxxxxV-mn4Gb9SdxxxxxxxxxxxxxxxxeJ0iY69yI7x-jcBWgBrhSOaexxxxxxxxxxxxxdiXgN5TQWOjulPbT-copH0Jnr3sQ7oUpxxxxxxxxxxxxxxxxxxxxxxxxxxTXhQ5UcFbLh3xxxxxxxxxxxRSQWXIxv_KgGQxxxxxxxxxxxxxBmGF-9fbxxxxxxxA.

Use the following payload to make the Call:

{ "to":[{ "type": "phone", "number": "+49711xxx" }], "from": { "type": "phone", "number": "32460201xx" }, "answer_url": ["https://nexmo-community.github.io/ncco-examples/first_call_talk.json"]}

answer_url is pointing to the webhook endpoint providing the NCCO that manages the Call.

And make the Call.

uri: https://api.nexmo.com/v1/calls The Call status is: {"type":"UNAUTHORIZED","error_title":"Unauthorized"}

Well, everything seems to work fine, except that i get the Unauthorized error :(


You have to download the nexmo-cli and create an app and link a phone number to that app so you can use the Voice API. When you init the client you then include the private key generated when creating the app in the nexmo-cli and the application id as parameters.

链接地址: http://www.djcxy.com/p/33128.html

上一篇: Nexmo未将签名参数传递给webhook回调

下一篇: Curl后未经授权