Closed rv-qjohnston closed 2 months ago
Unable to generate an auth0 token using clientId and secret. Receive error that oauth2: cannot fetch token: 415 Unsupported Media Type Response.
Create a data source with the below configuration:
When performing a query, receive this error:
oauth2: cannot fetch token: 415 Unsupported Media Type Response: {"type":"https://tools.ietf.org/html/rfc9110#section-15.5.16","title":"Unsupported Media Type","status":415,"traceId":"00-6faa912765b51b3bc33d48412c697167-95571988308e9835-00"}
The below curl using api documentation works successfully to generate a token:
Request: curl --request POST \ --url https://api.example.com/api/v1/auth/api-token \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{ "clientId": "string", "secret": "string" }'
Response: { "token": *", "refresh_token": "***", "expires_in": 86400 }
Describe the bug
Unable to generate an auth0 token using clientId and secret. Receive error that oauth2: cannot fetch token: 415 Unsupported Media Type Response.
Steps to reproduce
Create a data source with the below configuration:
When performing a query, receive this error:
oauth2: cannot fetch token: 415 Unsupported Media Type Response: {"type":"https://tools.ietf.org/html/rfc9110#section-15.5.16","title":"Unsupported Media Type","status":415,"traceId":"00-6faa912765b51b3bc33d48412c697167-95571988308e9835-00"}
Version Details:
Additional context
The below curl using api documentation works successfully to generate a token:
Request: curl --request POST \ --url https://api.example.com/api/v1/auth/api-token \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{ "clientId": "string", "secret": "string" }'
Response: { "token": *", "refresh_token": "***", "expires_in": 86400 }