rest Api step authentication using bearer token

M Mari Selvam
Tera Contributor

I'm currently using a REST API step that requires a username and API key-based connection and alias. However, my API authentication method relies on a bearer token rather than an API key. I've attempted to obtain the token using the 'Get Connection Info' step and utilize the result in a data pill picker for the REST API connection, but it was unsuccessful. Could you please provide guidance on how to correctly implement the bearer token for authentication instead of the API key?

1 ACCEPTED SOLUTION

Shruti
Mega Sage
Mega Sage

Hi,

Use REST Step in flow designer

Shruti_0-1698414880293.png

Create connection and credential aliases

Select connection alias and pass bearer token in Headers 

Shruti_1-1698414940200.png

Shruti_2-1698415041645.png

 

View solution in original post

6 REPLIES 6

Shruti
Mega Sage
Mega Sage

Hi,

Use REST Step in flow designer

Shruti_0-1698414880293.png

Create connection and credential aliases

Select connection alias and pass bearer token in Headers 

Shruti_1-1698414940200.png

Shruti_2-1698415041645.png

 

Dewald
Tera Contributor

Hi,

 

How would you configure the connection and credential aliases where the bearer token has to be regenerated every 1 hour?

Hi @Dewald, if you found the answer, I'll be greatful to you if you share the solution with me, because I have the same doubt here and can't find the solution, Thanks!

Hi @Jordan Corr_a, I build my own flow to take care of this.

 

The flow works as follow:

  1. Trigger on a schedule every 59min
  2. Do the call to get new token
  3. Save the token
    1. I currently save this against a custom field: u_token for the integration user I created.

Would have expected this integration functionality to be OOTB, but got some experience building my own things.

 

Hope this helps