Postman "Get New Access Token" jwt malformed

I’m trying to connect to my API with Postman. I have followed the following 2 tutorials:

  1. Auth0 Node (Express) API SDK Quickstarts: Authorization
  2. How to Manage a Collection of Secure API Endpoints with Postman

I am able to get the unauthorized “public” API to work.
I am also able to retrieve a New Access Token in Postman. However, when I try to use the access token in Postman authorization, and call the “private” API, I get “UnauthorizedError: jwt malformed”.

It may seem that the JWT I retrieved is too short - only 32 symbols, should this have been different?
If so, why am I getting only a 32-symbol JWT - and how can I change this?

If the Token with 32 symbols is correct - is the issue perhaps with the code? (I am using the checkJWT middleware in link 1)

1 Like

I solved it myself - sort of.
Basically, the “?audience={{auth0_audience}}” part of the Auth URL setting in Postman did not work. I had to set a default audience for the tenant in Auth0 instead.

Ideally, of course, I would be able to use the example from the tutorial - but I was not able to make it work.

2 Likes