Best answer

Is there a way save the auth_token and userId from response and use it for trigger?

  • 14 September 2023
  • 2 replies

Userlevel 1


I'm a new Zapier user, so please bear with me.

I am trying to integrate our app into Zapier. I am getting success and a response with an auth_token and userId using basic auth on hitting our portal login API.
(See screenshots)

My question is, how can I take the auth_token and userId from the response and use them in the trigger, as they are required to hit different API in our app?

I tried using StoreClient to store the token but I am getting StoreClient is undefined error.

Please provide explaination in layman's terms.

Thanks in advance!


Best answer by connorz 15 September 2023, 18:45

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.

2 replies

Userlevel 3
Badge +6

Hey @Ikhlas Azmat , 

It looks like the integration is currently using Basic authentication, correct?

If so, as you found, Basic auth does not store the token.

Instead, I might suggest checking out Session authentication:

Session auth allows you to make a token exchange request, and the token is stored as a property on `bundle.authData` so it can be accessed and used in triggers and actions. 

For user id, you might consider creating a computed field:

Userlevel 1

Thank you very much for the quick response! @connorz 

I will try to implement the session auth and follow through with the update.