Skip to main content

Hi, I am creating a custom zapier integration. Authentication is Oauth 2.0 but grant_type = client_credentials. 

Article attached suggested I should use Session Auth in my case which is what I am doing.

ISSUE: My main Auth url is working fine. It returns a status code 200. I want to use the response returned, specifically access_token field from auth url response in the HTTP header of my Test API call. How can I use response from Auth url in Test API url?

HTTP Header should be like this: Authorization: Bearer your-access_token-goes-here
What I did: Authorization: Bearer {{bundle.authData.sessionkey}}

What did you sofar do? 

 

Did you use the get module? 

Did you use custom code? (Js/python)?


No, nothing out of the texbook. I am creating this integration through Platform UI. I am using JavaScript but I haven’t written any custom code. 


After doing some experiments I was able to figure it out on my own. 

Here’s what I did:

  • I created a computed field and gave it a key access_token (naming convention same as required by the API). 
  • Fetch the access_token (results.access_token) and stored it in a field access_token in Auth url section
  • used {{bundle.authData.access_token}} to use the access_token in the HTTP Header of Test API call.

Thanks for sharing the solution @adilalich !