Authorization

This documentation explains how to get access to the Hub API.

Introduction

Before you are able to access any protected resources via the API, you will need to present a valid Bearer Token in the header of all requests when using the Hub API.

Please contact the 360dialog customer success team via support@360dialog.com to receive your username and password, with which you will be able to generate a token using the authentication endpoint.

Get Authorization Token

Request

Method, Endpoint & Header
Body
Method, Endpoint & Header
POST /v1/token
Content-Type: application/json
Body
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}

You will receive a response with your access, as well as how long the access token will stay valid for. Always keep this token secure and only communicate with the API via a secure, HTTPS connection.

Response

{
"access_token": "****",
"token_type": "Bearer",
"expires_in": 86400
}

When making subsequent requests include this token in the headers in the format

Authorization: Bearer <YOUR_TOKEN_GOES_HERE>

If you do not include the token or do not follow the correct format, your request will fail.