API Authentication Bearer Token

Overview

When integrating with an API (application programming interface) APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. call, you must set up authentication. One form of authentication is Bearer Tokens. This authentication requires the person making the API call to enter a unique token. With the correct token, or access code, the API call responds to the request successfully.

Bearer tokens take the form of cryptic strings generated by the integrated service. When you submit a request using a Bearer Token A bearer token is an HTTP authentication scheme that allows clients to generate a cryptic string used to authorize access to server resources., you don’t have to request on behalf of an individual. Instead, you request on behalf of an application.

Common APIs that need bearer tokens are SendGrid, Postman, and Twitter.

Setting Up Bearer Token Authentication

Before using a bearer token in your API calls, you must select the right authentication. You can do that when you set up a new service.

To add a bearer token authentication to a service: 

1. At the top right of the screen, click the Administration button.
2. Under Integration, click Services Administration.
3. From the Services Administration list, click the name of the service you want to modify.
4. From the left menu, select Service Type.
5. In the Authentication Method* drop-down, select Bearer Token.
6. Enter the bearer token value in the Bearer Token field.

The service you’re integrating with Unqork provides the bearer token value.

A static image displaying bearer token setup on the service administration page.

7. Click Save Changes.

Now, any time Unqork makes a call to that API, it sends the token in the Authorization header. Here's what the header looks like: Authorization: Bearer <your token here>.

Testing Bearer Token Authentication

Before finalizing your bearer token A bearer token is an HTTP authentication scheme that allows clients to generate a cryptic string used to authorize access to server resources. authentication, you'll want to test it. To do that, you'll test your new service integration. You can test your new integration by making an API call in any module. You can also test your integration using an external tool such as Postman. If your API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. call is successful, your authentication is set up correctly. But, if you receive a 400 error, read the error message. Based on the error returned, take the necessary actions to fix your authentication for your integration.