team-telnyx / twexit-python

Python SDK for Twexit
MIT License
1 stars 0 forks source link

"Finding the organization id" documentation doesn't work #2

Closed jabowery closed 3 years ago

jabowery commented 3 years ago

https://developers.telnyx.com/docs/v2/messaging/twexit?lang=curl and https://telnyx.com/resources/twexit-api-tutorial-python-sdk

Provide this curl command:

curl --request GET \
  --url https://api.telnyx.com/v2/whoami \
  --header 'authorization: ${auth_v2_api_key}'

which produces this error:

{
  "errors": [
    {
      "code": "10009",
      "title": "Authentication failed",
      "detail": "Unrecognized Authorization header format, should be one of Basic or Bearer",
      "meta": {
        "url": "https://developers.telnyx.com/docs/overview/errors/10009"
      }
    }
  ]
}

Adding "Basic" to the authorization string doesn't help:

$  curl --request GET   --url https://api.telnyx.com/v2/whoami   --header 'authorization: Basic ${auth_v2_api_key}'                        {
  "errors": [
    {
      "code": "10009",
      "title": "Authentication failed",
      "detail": "Basic credentials not Base64 encoded",
      "meta": {
        "url": "https://developers.telnyx.com/docs/overview/errors/10009"
      }
    }
  ]
}

Also, there is no documentation on the "whoami" end point and a google search support.telnyx.com for "basic or bearer" produces nothing.

drewkit commented 3 years ago

will be correcting documentation to the following:

curl --request GET \
  --url https://api.telnyx.com/v2/whoami \
  --header 'Authorization: Bearer ${auth_v2_api_key}'