On my resource setup I have chosen OAuth 2.0 as the authentication method and I fill the requested parameters, everything seems okay and when i test out with the button
"Test OAuth integration with your own account"
I'm sent to auth0 were I login correctly, then I'm redirected back to the resource and on the Access Token parameter now I have ---encrypted on server---
But when I sent a request to the resource I get the previous error.
Any ideas?
Is there a way to see what is the exact request that retool is using, supposedly it should be sending the Token in the Header Authorization: Bearer OAUTH2_TOKEN but I feel that OAUTH2_TOKEN is not being sent. Where can I see the current value for OAUTH2_TOKEN?
If you go into a Retool app and create a query to this resource (after having authenticated it), when you preview the query you’ll be able to expand the request --> headers field in the JSON.
If the token isn’t being passed in from the OAuth2 workflow, it will say a literal BEARER OAUTH2_TOKEN string
If it is passing in the token, that will say Bearer [some_real_token] instead. If that’s the case, then the token which is being returned from that OAuth workflow isn’t what this API is expecting to use for it’s authentication
Since this is a JWT token, there’s also a chance that it’s not being returned as a standard key name and wouldn’t be picked up in the standard OAuth2.0 authentication workflow. If that’s the case, you might be able to get this working in a custom auth workflow that uses OAuth2.0 as a step
My request is to a GraphQL resource, is there a way to see the request metadata in this kind of resouce? It appears that this is only available to (restapi) resources.
hey @Alejandro! You can see the request metadata for all of the available resources in Retool within that query preview window. Here’s what it looks like for a GraphQL query:
Ahhh, gotcha! You can view the request parameters via the DevTools network tab. You’ll want to look at the “preview” request details > under the Request tab > and then under “userparams”: