|
/ Documentation /App Builder/ How to Set-Up the Integration Based on Auth Type Session Auth

How to Set-Up the Integration Based on Auth Type Session Auth

This guide will walk you through how to authenticate your application using Session Authentication, using “SendPulse” as an example app.

When setting up Session Authentication in SureTriggers App Builder, you’ll create a screen where users can enter their credentials to connect their app to SureTriggers. This allows users to securely log in and link their app with the platform.

Let’s get started!

How to Set-Up the Integration Based on Session Auth

Here’s how you can authenticate with the App Builder using the basic authentication method:

  • Login to your App Builder dashboard.
  • Here, click on the “Build New App” button. Fill in all the details of your app in the flyout, and then click on the “Create” button to create the app. Check out this article to learn more about this.
  • You’ll be automatically redirected to the “App Overview” page. Here, click the Add Authentication button to proceed.
  • On the Authentication page, select “Session Auth”. We followed SendPulse API documentation for selecting the authentication type as the Session Authentication..

Now, you need to add the input ID and Secret fields for the connection. This is required for SureTriggers users to pass the authentication while creating the connection between SendPulse and the SureTriggers platform.

Only then, they will be able to include SendPulse (or your app) as a part of their automation workflows.

Please note that some applications will require a Client ID and Client Secret, while others may use different authentication fields according to their API documentation.

Create ID field:

  • To do so, click the Add Auth Field button to create the input field for users.
  • Give the field a user-friendly name, such as “Client ID” This is what users will see when they connect Close to SureTriggers.
  • In the “Name” field, give the API key a unique label, like “client_id” This label helps SureTriggers know what data is being sent. (internal label)
  • Add a simple Description that explains to users on how to get the API key like “To obtain your Client ID, log in to your SendPulse account, go to the profile section in the left corner, choose Account Settings, and click on the API tab.”
  • Check the box to make this field required since users must map this connection field to authenticate.
  • For security, select the field type as Password to hide the token when entered.
  • Finally, click the Save Auth field button to save your authentication.

Create Secret field:

  • To do so, click the Add Auth Field button to create the input field for users.
  • Give the field a user-friendly name, such as “Client Secret” This is what users will see when they connect Close to SureTriggers.
  • In the “Name” field, give the API key a unique label, like “client_secret” This label helps SureTriggers know what data is being sent. (internal label)
  • Add a simple Description that explains to users on how to get the API key like “To obtain your Client Secret, log in to your SendPulse account, go to the profile section in the left corner, choose Account Settings, and click on the API tab.”
  • Check the box to make this field required since users must map this connection field to authenticate.
  • For security, select the field type as Password to hide the token when entered.
  • Finally, click the Save Auth field button to save your authentication.

How to Create Your Basic Authentication?

  • To create an authentication, click on the plus icon beside Create Authentication.
  • Then, you will be prompted to a flyout where you need to Add Authentication Credentials.
  • Use the easiest available endpoint. For example, use a POST method with an endpoint URL from SendPulse’s API documentation (e.g.,https://sendpulse.com/integrations/api ) Generally it is always POST, however always choose Method according to your API documentation. In case of SendPulse it is POST, we have chosen POST here.
    • Select Payload Type as the Raw JSON.
    • Select Basic Auth as the No Auth.
    • Add the below code to the RAW JSON field and click on Test Request.
{
    "grant_type": "client_credentials",
    "client_id": "",
    "client_secret": ""
}

For the client_id and client_secret values, dynamically fetch them by clicking the Dynamic Data icon. As shown in the screenshot, after retrieving the values, we’ve assigned client_id to {{client_id}} and client_secret to {{client_secret}}.

Then, click on the Save Authentication button.

How to Test Your Basic Authentication?

After setting up the authentication, it’s important to test the connection to ensure everything is working correctly. Here’s how to test it:

  • Verify the Credentials: Once you’ve set up the authentication, click on the plus icon next to the “Verify Credentials” tab in App Builder.
  • Make a Test API Call:
    • App Builder will send a test request to Close to ensure that the authentication is valid.
    • Use the easiest available endpoint for the test call. For example, use a GET method with an endpoint URL from Close’s API documentation (e.g., https://api.sendpulse.com/addressbooks).
    • Select Bearer Token as the authentication type. (The reason we selected Bearer Token as the option here is that, if you refer to the SendPulse API documentation here, you’ll notice that the token type in the response is specified as a Bearer Token.)
    • Paste {{access_token}} value in the Bearer Token (The reason we taken this value it because it is mentioned in the SendPulse API documentation)
  • After filling out the required fields, click the Verify Connection button. If the connection is successful, you’ll receive a notification.
  • A new Add New Connection pop-up will appear. Enter the title for connection, Client ID and Client Secret and click Connect SendPulse CRM button
  • You will receive a successful connection notification afterward.

Upon successful verification, you will get a success message telling you that App Builder successfully connected with SureTriggers.

You can now click on the Save Test Authentication button at the bottom of the flyout form.

That’s all! You can now start setting up actions and triggers for your app.

What If the Authentication Fails?

If the connection fails during testing, here are some steps to troubleshoot:

  • Make sure you’ve entered the correct ID and Secret values of SendPulse CRM. If it’s incorrect or expired, you won’t be able to authenticate.
  • Ensure that the API endpoint and method are correctly set according to Close’s API documentation.

If these troubleshooting steps don’t solve the issue, refer to the SendPulse API documentation or contact support for further assistance.

By following this guide, you can easily authenticate SendPulse with SureTriggers using the session authentication method. With this secure connection, you can automate your tasks and workflows seamlessly across platforms.

If you have any questions or run into any issues, don’t hesitate to reach out to us. We’re always here to help!

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Scroll to Top