Token

Authentication in Cakemail Next-gen API works with OAuth2 Bearer Tokens. You can obtain a token by calling the Create a token endpoint using your Cakemail credentials (username and password).

The token you obtain contains the following:

  • Access Token
  • Token Type
  • Expires In
  • Refresh Token

The token might expire. When this happens, you can call the Refresh a token endpoint using the Refresh Token to get a new one.

Once you have a valid token, you can make calls to the API using the Access Token.

To make it easier to work with tokens, we provide SDKs in various languages that handle all that.

pip install cakemail
composer require cakemail/cakemail
import cakemail

api = cakemail.Api(username='<Cakemail username>', password='<Cakemail password>')
<?php

$api = new \Cakemail\Api('<Cakemail username>', '<Cakemail password>');