Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
68 lines (52 loc) · 1.7 KB

File metadata and controls

68 lines (52 loc) · 1.7 KB
description
Gets the banners to be shown to the authenticated user

Get banners

URL Requires Auth HTTP Method
api/v1/banners YES GET

Headers

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)

Query Params

Argument Example Required Description
platform web true The platform rendering the banner

Example Call

curl --location --request GET 'http://localhost:3000/api/v1/banners?platform=web\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

Result

Success

{
    "banners": [],
    "success": true
}

Errors

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.

{% tabs %} {% tab title=" Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="Missing key " %}

{
    "success": false,
    "error": "Match error: Missing key 'platform'"
}

{% endtab %} {% endtabs %}