Skip to main content
Best answer

Newbie question - use authentication response payload in subsequent triggers

  • February 25, 2021
  • 7 replies
  • 174 views

I have a JSON response from the authentication step that includes a key pair with a customer ID value that I then need in the next trigger as a form parameter for a POST to retrieve some data for that customer. I am probably being very dim but I just can’t how to reference API call response data in the Zapier code.

Best answer by ikbelkirasanBest answer by ikbelkirasan

Hi @roboticcx - The authentication data is passed to your trigger’s handler via the bundle.authData object. So if the customer ID is stored in customer_id, it can be referenced as bundle.authData.customer_id.

View original
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.

7 replies

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • Answer
  • February 25, 2021

Hi @roboticcx - The authentication data is passed to your trigger’s handler via the bundle.authData object. So if the customer ID is stored in customer_id, it can be referenced as bundle.authData.customer_id.


  • Author
  • Beginner
  • 4 replies
  • February 25, 2021

Thanks @ikbelkirasan for the quick response and great answer. I thought it would be something simple I was missing. +

 


  • Author
  • Beginner
  • 4 replies
  • February 25, 2021

@ikbelkirasan Its not working as I thought it would. The authentication response is not getting added to the authData in the bundle. 


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

@roboticcx - Which authentication method is your integration using?


  • Author
  • Beginner
  • 4 replies
  • February 25, 2021

API Key


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

Try using Session Auth instead to be able to fetch the customer ID.


  • Author
  • Beginner
  • 4 replies
  • February 25, 2021

OK. Thanks @ikbelkirasan . Will do.