...
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
POST | https://{enterprise}.cvtr.io/api/login |
Parameter | Required | Description |
---|---|---|
username | Yes | Your username |
password | Yes | Your password |
mfa_token | No | MFA token supplied if MFA is enabled on your account. |
mfa_code | No | Your 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.
...
Parameter | Required | Description |
---|---|---|
client_id | Yes | Client ID which is supplied on a platform wide basesbasis |
client_secret | Yes | Client Secret which is supplied on a platform wide basesbasis |
api_key | Yes | API Key that is unique to each user |
...
Parameter | Required | Description |
---|---|---|
client_id | Yes | Client ID which is supplied on a platform wide basesbasis |
client_secret | Yes | Client Secret which is supplied on a platform wide basesbasis |
api_key | Yes | API Key that is unique to each user |
grant_type | Yes | Must be set to "password" |
username | Yes | Your username |
password | Yes | Your password |
...