Flow Designer - REST Step | how to pass a token from script step to the REST Step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 02:00 AM
Hi, due to different requirements on the body I need to query the token in a script step before the rest step.
The token I get is currently still in the log.
Now I have problems to pass the token to the rest step.
The token uses a connection alias and in my opinion expects the token in the oauth_credential table.
For example, if I request the token manually via the UI action ‘get Oauth Token’. The token is stored in the oauth_credential table and the REST step then accesses this token.
How do I do this in a script step for the REST step?
How do I transfer the token?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 01:00 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 03:11 AM
Hi its was helpful 🙂 and i marked it already as this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2026 03:01 PM
Don't write to the oauth_credential table by hand — that's the platform's job, and fighting it is where tokens go to die in logs (rotate that token, by the way — it's in your log now).
Two clean paths. Path one, the right one 90% of the time: skip the script step entirely and let the REST step's Connection & Credential alias handle OAuth. If the token endpoint is standard, configure the OAuth entity once and the step acquires and refreshes the token itself.
Path two, when you genuinely need a pre-fetched token (custom grant, non-standard body): have your script step return the token as a data output, then reference it in the REST step's Authorization header directly (Bearer ${token}) with the step's auth set to none. You own the token lifecycle then — including refresh.
The middle ground — half alias, half manual — is what breaks. Pick a lane.