Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All Publisher users by default have access to the Convertr Publisher API. Your access credentials are supplied with your campaign assets after you have been assigned to a campaign, but are also available from the Convertr Dashboard.

3.2 Authentication Token

In order for you to query the API, all request must be sent with an authentication token.

available from the Convertr Dashboard.

3.2 Authentication Token

In order for you to query the API, all request must be sent with an authentication token.

This needs to be requested from the following url using a POST request. Once the token has been returned, it will expire after 60 minutes.

Request

POSThttps://{enterprise}.cvtr.io/api/login


ParameterRequiredDescription
usernameYesYour username
passwordYesYour password
mfa_tokenNoMFA token supplied if MFA is enabled on your account.
mfa_codeNoYour MFA SMS code if MFA is enabled on your account.


If Multifactor Authentication (MFA) is active on your account, you will receive the mfa_token and mfa_code by making the above request with only the required parameters. This will return the below response, with the mfa_code sent via SMS to the number listed on the user account.

Response

Code Block
{
    "error": "Mfa Required",
    "error_description": "Multifactor authentication required",
    "mfa_token": "MmE3Mzk0ODk0ODU4OWQ0MTAxNDBmNGE0YzExZDdlYjYzMzhhZDFlM2MzNDBiNjU4NzFlZTM1MzcxNTZkZThhNw"
}


You can then use these parameters to make a second complete request and retrieve the token.

Response

Code Block
{
    "access_token": "MDU1OGViMzJhNmNiYWVhODdjZjA3M2EwNTQ1NDQ5ZjQ0YTJhNDQxMzNhZTcyNWIxNDJjMjJjZmM5YjhhNmU0Mw",
    "expires_in": 3600,
    "token_type": "bearer",
    "scope": null,
    "refresh_token": "N2QwYWZlOTliYThmZmQwNDRhNDcyMGQwZGU0ZjlhODlkMGI4OGQwODIzYjNlMDUzYWMxY2RlZWI0MmVlZTMwNw",
    "client_id": "xxxxxxxxxxxxxxxxxxxxxx",
    "client_secret": "xxxxxxxxxxxxxxxx",
    "user_id": 167,
    "password_expired": false,
    "expires_ts": 1621853938
}



You can also authenticate via OAuth2.0. This needs to be requested from the following url using a GET request. Once the token has been returned, it will expire after 60 minutes.

...

ParameterRequiredDescription
client_idYesClient ID which is supplied on a platform wide basesbasis
client_secretYesClient Secret which is supplied on a platform wide basesbasis
api_keyYesAPI Key that is unique to each user

...

ParameterRequiredDescription
client_idYesClient ID which is supplied on a platform wide basesbasis
client_secretYesClient Secret which is supplied on a platform wide basesbasis
api_keyYesAPI Key that is unique to each user
grant_typeYesMust be set to "password"
usernameYesYour username
passwordYesYour password

...