Get Banner UI
Retrieve the required attributes to render the banner UI
API
(GET) https://mobile-data.onetrust.io/cfw/cmp/v1/banner
API Reference: https://developer.onetrust.com/onetrust/reference/get_banner
Request headers
Key | Value | Description | Required? |
---|---|---|---|
OT-CDN-Location | string | CDN location | Yes |
OT-App-Id | string | App ID | Yes |
OT-SDK-Version | string | API version to fetch | Yes |
OT-Device-Type | string | Type of the device e.g. mobile, ctv | Yes |
OT-Consent-String | string | Base 64 encoded consent string. Should be empty for the very first call and passed in the header on subsequent calls to persist user consent data from one session to the next. | Yes, after the first API call |
OT-Identifier | string | Data Subject ID | Only when using cross device OR if passing in your own identifier |
OT-Sync-Profile-Auth | string | JWT auth token (generated using the public keys saved in OneTrust portal) | Only when using cross device |
OT-Fetch-Type | string | Determines if the data download should include profile data or not. By default if no fetch type is passed, we use APP_DATA_ONLY . If cross device is in scope, pass in APP_DATA_AND_SYNC_PROFILE | Only when using cross device |
OT-Language | string | Language to display the UI | No |
OT-Country-Code | string | Country code of end user | No |
OT-Region-Code | string | Region code of end user | No |
OT-Force-Fetch | string | Return banner data regardless of shouldShowBanner status. By default, this is false. Set to true to force the return of banner data | No |
OT-Tcf-Eu2v2-Consent-String | string | IAB TC String <IABTCF_TCString > | Only when IAB TCF is in scope |
Note
Banner details are not returned if the banner is not configured to be shown in your geolocation rule.
Sample response (success):
{
"errors": [],
"appConfig": {
"showBanner": true,
"bannerReason": "Hundred percent sync has not happened for cross device sync enabled scenario.",
"bannerReasonCode": 107,
"templateType": "IAB2V2"
},
"bannerUIData": {
"general": {
"backgroundColor": "#FFFFFF",
"backgroundColorDark": "#2F2F2F",
"additionalDescriptionPlacement": "AfterDescription",
"layoutHeight": "full"
},
"logo": {
"url": "https://cookie-cdn.1trust.app/logos/static/ot_company_logo.png",
"logoVoiceOverText": "Banner Logo"
},
"summary": {
"title": {
"fontSize": "22",
"text": "We Care About Your Privacy",
"textAlign": "center",
"textColor": "#696969",
"textColorDark": "#FFFFFF"
},
"description": {
"fontSize": "16",
"text": "We and our 794 partners store and/or access information on a device, such as unique IDs in cookies to process personal data. You may accept or manage your choices by clicking below or at any time in the privacy policy page. These choices will be signaled to our partners and will not affect browsing data.",
"textAlign": "center",
"textColor": "#696969",
"textColorDark": "#FFFFFF"
},
"dpdTitle": {
"fontSize": "22",
"text": "We and our partners process data to provide:",
"textAlign": "center",
"textColor": "#696969",
"textColorDark": "#FFFFFF"
},
"dpdDescription": {
"fontSize": "16",
"text": "Use precise geolocation data. Actively scan device characteristics for identification. Store and/or access information on a device. Personalised advertising and content, advertising and content measurement, audience research and services development. ",
"textAlign": "center",
"textColor": "#696969",
"textColorDark": "#FFFFFF"
}
},
"buttons": {
"closeButton": {
"color": "#2F2F2F",
"colorDark": "#FFFFFF",
"showAsLink": true,
"borderRadius": "0",
"fontSize": "12",
"showText": true,
"text": "Continue without Accepting",
"textColor": "#696969",
"textColorDark": "#FFFFFF",
"interactionType": "BANNER_CLOSE"
},
"acceptAll": {
"borderRadius": "",
"color": "#346E4A",
"colorDark": "#6CC04A",
"fontSize": "17",
"text": "I Accept",
"textColor": "#FFFFFF",
"textColorDark": "#FFFFFF",
"interactionType": "BANNER_ALLOW_ALL"
},
"rejectAll": {
"borderRadius": "",
"color": "#346E4A",
"colorDark": "#6CC04A",
"fontSize": "17",
"text": "Reject All",
"textColor": "#FFFFFF",
"textColorDark": "#FFFFFF"
"interactionType": "BANNER_REJECT_ALL"
},
"showPreferences": {
"borderRadius": "",
"color": "#FFFFFF",
"colorDark": "#FFFFFF",
"fontSize": "17",
"showAsLink": false,
"text": "Show Purposes",
"textColor": "#346E4A",
"textColorDark": "#6CC04A"
},
"vendorList": {
"text": "List of Partners (vendors)",
"textColor": "#3860BE",
"textColorDark": "#3860BE"
}
},
"links": {}
},
"storageKeys": {
"IABUSPrivacy_String": "",
"IABTCF_AddtlConsent": "",
"IABTCF_TCString": "CP68pYAP68pYAAcABBENAKEsAP_gAEPgAChQg1NX_H__bW9j8Xr1aft0eY1P99j7ruQxBhfJE-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MEAYMAw0BiADFgGPAMhgZGBkkDJgMnAZUAywBmYDOQGeANEgaMBo4DTQGpgNVgauBrIDXgG0ANsgbcBt8DcgN1AcEA4sBx4Dk4HLAcuA50Bz4DrAHigPHgeSB5QD2gHxQPkA-UB9cD7QPugfsB-4D-wH_AQBAgIBAwCB4EEQIJgQYAg3BMwEzgJqATYgm2CbkE3gTfAnDBOUE5gJ0gTrgnaCdwE8AJ5hBqAEEAAQBlDgAQCdAG2EAAQAuQDTlAAICdA.f_wACHwAAAAA",
"IABTCF_CmpSdkID": 28,
"IABTCF_CmpSdkVersion": 1,
"IABTCF_PolicyVersion": 4,
"IABTCF_gdprApplies": true,
"IABTCF_PublisherCC": "UK",
"IABTCF_PurposeOneTreatment": false,
"IABTCF_UseNonStandardTexts": false,
"IABTCF_VendorConsents": "11010101111111110001111111111111110110110101101111011000111111000101111010111101010110100111111011011101000111100110001101010011111111011111011000111110111010111011100100001100010000011000010111110010010001001111101110000001011100100010111011110101101111110010011100000101111100011101100001001100010011010000001101111110101010011010100010000010101001100100010010000001001011101101110110110000010010000100000001011001010001110010000001110101000100110101001000101000000110101010001000000101011010111100100001110011000110101001000101100011001000010100110011010010100010011110100000011001001000100001010011000100010011001101100111010110000000100001011110011011111001100110001001010000111111100100000010100110001110011111111010011111010111011101110111011100011101100000111111101011011111110111011011111111001101110111011100111100101100111111001101010001111001111101110111111110011111111101100111101101000111100010110000100111010100001110011111001011010000110111111011111111010110110100010011100110111111101111010010000011010111011111111110111111001011111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101001111101111011111110111110111110111111110111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"IABTCF_VendorLegitimateInterests": "00000001011001100001101000010101000100000000010111011000000100100001001000010001011010000011100001000101000000100000000001010100000101011000010000000100010000000010100000000000000000000000000100100000011010001000000010000000000100100000011000000101001110110000001100000000100101110101100001001000100000000001000000000010100000000000000110000010000000000100000000000000001010001100100000000000010000000000000000000000010000000000001000010001000000000001001000000000010100000010000000000000000010000000010000001010000000000000000100000000000000000000010000000010000000000000100000011000000000000000010000000000010110000000100000000100000000000000001000000011101000000110001000010000000100000000000010100000010110000100000010010001100100010001000100001010011000000100001000010100000010010000010000000100101101100101000000100000100100000001011000001000001010111000010000000001000101100111100000000000010000000010001000100110000010100000000000010000000000000000000000001010110000000000000001000000010110000010110000000110001001001001000000010010101000010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011100000100010011011010001100101011010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"IABTCF_PurposeConsents": "11111111111",
"IABTCF_PurposeLegitimateInterests": "01000011111",
"IABTCF_SpecialFeaturesOptIns": "11",
"IABTCF_PublisherRestrictions": {
"4": "_________________________________________________________________________________________________________________________________________________________________________________________________________0__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________",
"7": "___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0",
"8": "________________________________________________________________________________________________________________________________________________________________________________________0_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________",
"10": "___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________"
},
"IABTCF_PublisherConsent": "11111111111",
"IABTCF_PublisherLegitimateInterests": "01000011111",
"IABTCF_PublisherCustomPurposesConsents": "",
"IABTCF_PublisherCustomPurposesLegitimateInterests": "",
"OT_GroupConsents": {
"C0001": 1,
"C0003": 1,
"C0002": 0,
"C0005": 0,
"C0004": 0
},
"OT_SdkConsents": {
"704806db-3653-44f4-b13b-52164408bc2e": 1,
"60bf4101-0b0c-451e-9c48-1eca1b402821": 1,
"599e5da7-a94e-4137-9335-3965fd823af7": 0,
"0f81f224-f142-46be-bba5-86736df1c238": 1
}
},
"otConsentString": "eyJMYXN0TGF1bmNoRGF0ZSI6MTcwNTA2Njk3MzI3NSwiU2hvdWxkU2hvd0Jhbm5lciI6MSwiTGFzdENvbnNlbnREYXRlIjoiMTcwMzY3NjY4MTIzOCIsIkRTSUQiOiJzdXAtbmV3bGtnYiJ9"
}
Sample response (error)
{
"errors": [
{
"code": "ERROR_CODE_MISSING_REQUIRED_HEADER",
"message": "Request header OT-Device-Type should not be null"
}
]
}
Banner reason code
Status Code | Banner Reason | Should Show Banner Status |
---|---|---|
101 | Show banner enabled in geo rule and is first launch | true |
102 | SDK data has been published with reconsent | true |
103 | Consent has expired | true |
104 | TC String has expired | true |
105 | Reconsent triggered for an authenticated user | true |
107 | 100% sync not achieved for cross device sync enabled scenario | true |
109 | The template type is updated to IAB | true |
150 | Show banner not enabled in geo rule | false |
151 | Banner will not be shown as consent validity holds true | false |
152 | Banner will not be shown as 100% cross device sync is achieved | false |
Response errors
Scenario | OT Custom Error Code | HTTP Error Code | Error Message |
---|---|---|---|
All generic server errors | ERROR_CODE_GENERIC_ERROR | 500 (Internal Server Error) | Something went wrong |
All required headers missing | ERROR_CODE_NO_ACCESS | 403 (Forbidden) | No access to this resource |
Invalid API route | ERROR_CODE_TEXT_RESOURCE_NOT_FOUND | 404 (Not Found) | Not Found |
Invalid OT-Consent-String header | ERROR_CODE_INVALID_OT_CONSENT_STRING | 400 (Bad Request) | Invalid OT consent string |
Invalid OT-Country-Code or OT-Region-Code header | ERROR_CODE_INVALID_COUNTRY_OR_REGION | 400 (Bad Request) | Invalid country code or region code |
Invalid OT-CDN-Location or OT-App-Id header | ERROR_CODE_BLOB_LOCATIONS_UNAVAILABLE | 400 (Bad Request) | Unable to fetch data for the specified Application ID. Please check your configurations |
Invalid OT-Fetch-Type header | ERROR_CODE_INVALID_FETCH_TYPE | 400 (Bad Request) | Invalid Fetch type |
Invalid OT-Device-Type header | ERROR_CODE_INVALID_DEVICE_TYPE | 400 (Bad Request) | Invalid Device Type |
Missing required headers e.g. OT-Device-Type, OT-CDN-Location etc | ERROR_CODE_MISSING_REQUIRED_HEADER | 400 (Bad Request) | Request header {{header}} should not be null |
Updated 18 days ago