Using OAUTH2_TOKEN "magic" placeholder in Retool Workflow

So while building my first Retool Workflow I discovered that the OAUTH2_TOKEN "magic" placeholder isn't so magic. Does anyone know how to specify the Bearer OAUTH2_TOKEN on a workflow resource query header? It works fine in apps, but this is the first time I've tried to reference the OAUTH2_TOKEN from workflow. I've tried reauthenticating inside of the workflow and then running it, but it spits out the 400 error (unauthorized) which is indicative of a missing Bearer token.

Any suggestions or guidance would be greatly appreciated.

So I figured it out on my own. For anyone who may come across this problem themselves. When using REST API inside of Workflow. You need to check "Share OAuth2.0 credentials between users" on the REST API resource. This will change the "OAuth Callback URL". Ensure to copy and paste the URL in the REST API itself so that the token it sends back is stored in the right place.

1 Like