Question

How do I use session tokens for authentication?

  • 22 November 2022
  • 1 reply
  • 294 views

Hello,

 

Has anyone successfully used session tokens for an integration. I’ve been working in an integration that needs the session token auth method but I keep getting unknown error or internal server error messages when I try to connect an account and test the authentication. 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 2
Badge +1

Hi @tami! 👋

There are three main steps when setting up Session Authentication for an app on the Zapier platform:

1. Create an input form that lets users of your app enter their credentials (usually a username and password) to authenticate with the API.

2. Setup an API request that exchanges those credentials for a session “token”.

3. Ensure the session “token” is correctly sent in every request the app makes to the API. Starting by setting up a test API call.

As first steps in troubleshooting, I’d recommend checking the documentation for the API you’re using to make sure that 1) the settings in the Zapier app platform are supplying the API with exactly what it needs in order to issue a session “token” and 2) the session “token is being correctly sent to the API in the test call.

When it comes to troubleshooting errors from the Zapier side, the “Monitoring” page is the best place to start: https://platform.zapier.com/docs/testing#monitoring

On the “Monitoring” page, you’ll be able to view the details of all the authentication requests that are being sent to the API and confirm whether 1) a session “token” is being successfully obtained and then 2) that “token” used in the test call, like this example:

84d3d2918c401dcad49313baaaf6695f.png
 

I hope this helps you to get authentication working successfully in your app! 👍 If not, please could you post the following details:

1. A link to the API’s “Authentication” documentation page.

2. Screenshots showing the details from the “Monitoring” page for errors during authentication steps.