|
/ Documentation /Apps & Integrations Setup/ How To Authenticate Your Application Using Basic Auth

How To Authenticate Your Application Using Basic Auth

This guide will walk you through the process of authenticating your application using Basic Authentication, with “Close” as an example app.

When setting up Basic Authentication in the SureTriggers App Builder, you’ll be creating a screen that prompts users to enter their credentials to link their app with SureTriggers.

Let’s get started!

How Does Basic Authentication Work?

In SureTriggers, Basic Authentication is a simple way for users to connect their apps by using a username and password. Here’s how it works step-by-step:

  1. User Provides Credentials:
    When setting up an app connection in SureTriggers, the user maps the connection field (username) provided by the app they want to connect to (for example, Close or any other service that supports Basic Authentication).
  2. Credentials Are Encoded:
    SureTriggers securely encodes the user’s credentials using Base64 encoding, which makes the login information safe for transmission over the internet.
  3. Request Sent to the API:
    SureTriggers sends the encoded credentials to the app’s API in the request headers, asking for permission to access the user’s data.
  4. Verification by the App:
    The app (e.g., Close) checks if the provided credentials are correct. If they match what the app has on record, the authentication is successful.
  5. Access Granted:
    Upon successful verification, SureTriggers gains access to the user’s account or data, allowing it to trigger workflows, perform actions, or retrieve data from the connected app.

Unlike more complex methods like OAuth, Basic Authentication in SureTriggers is direct and easy to implement, especially for users and apps that only require simple username and password verification.

Once set up, users can interact with their app data without needing to re-enter credentials for every session.

Authenticating Your App With Basic 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 “Basic Auth”. We followed Close API documentation for selecting the authentication type as the basic authentication key.

Now, you need to add the input field for the connection. This is required for SureTriggers users to pass the basic authentication while creating the connection between Close and the SureTriggers platform.

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

  • 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 “Basic Auth Username” This is what users will see when they connect Close to SureTriggers.
  • In the “Name” field, give the API key a unique label, like “username” 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 get API key, you have to visit Close CRM and go to Setting >Connect > Developer. Here, create an API Key.”
  • 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 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.close.com/api/v1/group).
    • Select Basic Auth as the authentication type.
    • For Username, click on the dynamic data icon and then select Authentication Fields, from here select the previously created connection fields i.e., Basic Auth Username

Note: Don’t enter your actual api key or credentials here to test to verify the connection.

  • 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, CloseCRM API key and click Connect Close 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 API key from Close 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 Close API documentation or contact support for further assistance.

By following this guide, you can easily authenticate Close with SureTriggers using the basic 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