Bad Credential using test token of API

I am trying to verify a backend application that uses an API created in Auth0.
To do this I use a call from postman. In that call I use an authorisation of type Bearer Token.

I include the test token suggested in the Test tab of my API.

The response I get is ‘Bad credentials’.

I don’t even know how to figure out what the problem is.

Hi @jaumesagues,

Welcome to the Auth0 Community!

Can you please share the request you made to your API?

And can you clarify if your decoded test token contains valid information about the issuer (to whom the token refers)?

Thanks,
Rueben

1 Like

I am testing a backend application that uses an Auth0 API. I made a request to the backend application from Postman that required authentication but no special permissions were needed (I am not using PermissionsGuard). I used the token that appears in the ‘Test’ tab of my Auth0 API. I was receiving the following error: " error_description=“Failed to fetch authorization server metadata” I had done this operation with another application using a tutorial from the Auth0 website and it had worked for me. Finally, the day before yesterday, after reviewing the configuration of the Auth0 API and tenant, the problem was solved but I don’t know how to explain why. My underlying problem is that I don’t know how to proceed when there are problems with the token. It’s not like a classic application that I know how to debug an error.
Thanks for your help

1 Like

Hi @jaumesagues,

Thanks for your response.

In general, if you encounter problems with your token, you can troubleshoot the issue by:

  1. Decoding the access token on JWT.io.
  2. Verify that the payload contains the right information, such as the scopes for your API.
  3. Compare it with https://YOUR_DOMAIN/.well-known/openid-configuration and ensure that the URL for the auth server is correct.

These steps should help with determining the origin of a "Failed to fetch authorization server metadata” error.

Let me know if you have any questions.

Cheers,
Rueben