Not able to send Token to API

Ready to post? :mag: First, try searching for your answer.
Hi

i was able to Access Token using curl POST
Sending the token to the API but below error How to achieve

curl --request GET --url 'http://api.xxxx.xxx.xx' --header 'authorization: Bearer eyJhbGcixxxxxxxxo9S1w' --header 'content-type: application/json'
{"statusCode":404,"message":"Cannot GET /"} 
 curl --request GET --url 'https://api.xxx.xxxx.xxx/api/v1/api-catalog/apps/all' --header 'authorization: Bearer eyJhbGciOiJ QOa9S1w' --header 'content-type: application/json'
{"statusCode":401,"message":"Unauthorized"}

Hi @rashid,

Your first request caused a 404 error message, which typically means that the server could not find any resource at the specific URL path, so most probably the API was not designed to accept requests to the "/" path.

However i believe your 2nd approach is actually the intended one, in which case the first thing to try would be decoding the token using a library such as jwt.io and verify if it is still a valid one by checking the exp claim.

Otherwise if a call was made with an Access Token that embeds all the necessary scopes, given the 401 Unauthorized Error I would recommend checking this Knowledge Article on - Access Token Rejected when Calling Auth0 APIs.

Sorry for the late reply as well, but answering this since it might help others as well.
Thanks,
Remus

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.