Skip to main content
Best answer

Newbie question - use authentication response payload in subsequent triggers

  • Feb 25, 2021 11:54 AM UTC
  • 7 replies
  • 270 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 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
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 Solution Partner
  • Answer
  • Feb 25, 2021 12:02 PM UTC

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
  • Feb 25, 2021 12:08 PM UTC

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

 


  • Author
  • Beginner
  • Feb 25, 2021 2:40 PM UTC

@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 Solution Partner
  • Feb 25, 2021 2:42 PM UTC

@roboticcx - Which authentication method is your integration using?


  • Author
  • Beginner
  • Feb 25, 2021 2:45 PM UTC

API Key


ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Solution Partner
  • Feb 25, 2021 3:21 PM UTC

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


  • Author
  • Beginner
  • Feb 25, 2021 3:27 PM UTC

OK. Thanks @ikbelkirasan . Will do.