shell

Security Token

In this guide, you will learn how to create a security token. Security tokens are used as an alternative log in method. A token may be used instead of the regular username and password in requests. These tokens can be deleted at any time to revoke access.

I. Create Token

In this section, we will create a security token through the Portal.

To set up a security token, log into your CarrierX account. On the left-side menu, locate and click on the Account menu. Click Security Tokens.

Click Tokens

Click Add New Token. Note that the system automatically creates the token Web Portal Active Session. This token should not be modified or deleted.

Click Add

Enter a name for the new token. This is a friendly name that is used for internal reference.

Name Token

Click Create Token.

Create Token

Click on a newly created token to obtain the Access Token.

Choose Token

Scroll down to find the token details. Click reveal to show the Access Token. This is what you will use in your requests instead of a username and password.

The token details also include the date, time, and IP address of the last token usage.

Click Reveal

In the following section, we will make a request using a security token.

II. Making a Request

In this section, we will make a request using a security token instead of a username and password.

Any type of request can be made using a security token. In our example, we are forming a GET request to return containers using the Core API. The security token is added to the header.

curl -X GET \
'https://api.carrierx.com/core/v2/storage/containers' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'


A successful request will return a 200 status code along with a response, just like would be returned when making a request with a username and password.

III. Revoke Token

In this section, we will learn how to delete a security token using the Portal. You may choose to do this to protect your applications in case of security breaches or to revoke access for a specific login.

Log into your CarrierX account. On the left-side menu, locate and click on the Account menu. Click Security Tokens.

Click Tokens

Click on the token that you wish to revoke.

Choose Token

Click Delete.

Click Delete

IV. Next Steps

You have just created a token! Now you can manage your logins more securely and easily. For a compehensive guide to the CarrierX Core API, refer to the Core API Reference Guide.