Get banner by id
Gets the banner to be shown to the authenticated user
URL | Requires Auth | HTTP Method |
---|---|---|
api/v1/banners/:id | YES | GET |
Argument | Example | Required | Description |
---|---|---|---|
X-User-Id | myuser-name | Required | Your username hash (returned after you log in through the API) |
X-Auth-Token | myauth-token | Required | Your token (returned after you log in through the API) |
Argument | Example | Required | Description |
---|---|---|---|
platform | web | true | The platform rendering the banner |
Argument | Example | Required | Description |
---|---|---|---|
id | ByehQjC44FwMeiLbX | true | The id of the banner |
curl --location --request GET 'http://localhost:3000/api/v1/banners/:id?platform=web\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'
{
"banners": [],
"success": true
}
The following errors can occur upon the endpoint.
- Authorization: Requires an authentication token for the request to be made.
- Missing Key: Requires
platform
key for the request to be made.
Authorization
Missing key
{
"status": "error",
"message": "You must be logged in to do this."
}
{
"success": false,
"error": "Match error: Missing key 'platform'"
}
Last modified 1yr ago