Skip to main content
Question

how to send authorization token for the trigger


Javier Sanchez

Good evening community.

I am trying to pass the authorization token variable (of type API KEY) for the trigger in the header, I use Bearer {{bundle.authData.accessToken}} and it gives me error 401 but if I put the code in hard if it works, so which I deduce is the way I send the information. Someone can help me

 

 

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • January 7, 2021

Hi @Javier Sanchez - Can you share the code snippet that worked for you?


Javier Sanchez

 

Good afternoon greetings
I put the token code in hard

 


ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • January 7, 2021

@Javier Sanchez - In that case, are you sure the API key field name is accessToken? I would start by verifying that. Can you show us a screenshot of the authentication fields setup? Thanks!


Javier Sanchez
this is the authentication, I send the googleUID and it returns a token

 

 

i have tried using also Bearer {{bundle.authData.token}}

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • January 8, 2021

@Javier Sanchez - In your case, you should use Session Authentication instead of API authentication.

Docs: https://platform.zapier.com/docs/session#authentication--session-auth