Skip to content

Token Authentication

When using our APIs you must authenticate your requests so our servers can verify which account the request belongs to.

Create an Account

Before you can start using the GatewayAPI service, you will need to register an account with us. When creating an account, a set of API tokens is generated for you. Additional tokens can be created or revoked from the dashboard at any time.

Token Authorization Header

The simplest form used for authentication is to just set the Authorization header with the token itself using the Token authorization scheme.

1
2
3
4
5
6
7
POST /mobile/single HTTP/1.1
Host: messaging.gatewayapi.com
Authorization: Token YOUR_API_TOKEN
Accept: application/json, text/javascript
Content-Type: application/json

{"message": "Hello World", "recipients": [{"msisdn": 4512345678}]}

Token vs Bearer

This may look similar to the Bearer authentication scheme.

While technically comparable, the Bearer scheme is strongly associated with OAuth and JWT-based authentication. To avoid confusion, GatewayAPI uses a dedicated Token scheme for simple API token authentication.