How to have access to a variable created in the Custom Auth

In order to access my API endpoint I need the Bearer token.

When I test the Custom Auth it works, but when I want to call another API endpoint that needs that token I'm not able to get the AUTH_TOKEN variable

I've tried adding it to the header but it doesn't work.

What am I doing wrong here?

Hello @Bruno_Lopes_Bacelar!

That's odd, could you share a screenshot of the error message you got when you tried to call the 'Customer Report' Resource?

You do need to have the token in the header as shown in the docs here.

Also the issue might be that the custom auth seems to set on the 'Authentication' resource, while your API request/Query you want is for the 'Customer Report' resource, which from you screen shot I can't tell if it has the same custom auth set in it's Authentication field.

The flow for the event should be a user clicks on the login button that triggers the custom auth modal, then once they enter their username and password the token will be returned, then all subsequent API requests to that resource will contain the authentication header, as shown in the docs I linked above.

You shouldn't be getting an auth token from one resource and then trying to use it for a different resource. The token is meant to give a user access to the resource that is validated with the custom auth.

Let me know if that helps!