Find Opportunities
POST /ad/v1/opportunity
Find ad opportunities for the user given optional screen sizes. This will generate a new ad api token that is returned in the response header.
Authorizations
Parameters
Header Parameters
Optional header to make calling the endpoint faster by not requiring a new token to be generated.
Optional header to make calling the endpoint faster by not requiring a new token to be generated.
Request Body required
object
Width of the screen in pixels
Height of the screen in pixels
ISO 3166-1 alpha-2 country code for the user
ISO 639-2 language code
Unique Identifier for the device a session is started on. E.g should be the same for multiple users on the same device.
Responses
200
Successful Response
object
object
The URL to the ad
The number of seconds the ad is
The ID of the ad opportunity
Headers
Provide this token to future requests for the same user to make their requests faster (as a new token doesn't need to be generated)
403
Error Codes:
auth_invalid_key_id
- Invalid Authorization - Invalid Key ID in Access Tokenauth_invalid_version
- Invalid Authorization - versionauth_malformed_access
- Invalid Authorization - malformed access tokenauth_not_jwt
- Invalid Authorizationauth_token_expired
- Token is expiredauth_token_format
- Invalid Authorization - {}auth_token_invalid_claim
- Token contained invalid claim value: {}auth_token_invalid_type
- Invalid Authorization - Invalid Token Typeauth_token_sig_invalid
- Token Signature is invalidauth_token_unknown
- Failed to parse tokeninsufficient_permissions
- Insufficient Permissions
object
422
Validation Error
object
object
500
Internal Server Error
Headers
Provide this token to future requests for the same user to make their requests faster (as a new token doesn't need to be generated)