Token Creation

This authentication schema requires users to pass parameters inside the token together with corresponding query params within the API request.

Users must create a HMAC-256 value from the string, and converting this value to a string in hexadecimal format.

This Authentication schema should only be used on the Streaming API.

Authentication Schema

  • Order of the fields is mandatory

  • The separator between the fields is the character “:” (UTF char code 3A)

  • HMAC-SHA256 should be used for encryption

Order

Field

Mandatory

Example Value

Corresponding Query Parameter

Description

1

URL

YES

/api/v2/events/12345/stream

URL path

2

SECRET

YES

S3CR3T!

operatorId=[ID]

Operator ID

3

TIMESTAMP

YES

123456789

timestamp=123456789

Number of milliseconds since the Unix epoch, i.e. number of milliseconds since midnight January 1st 1970, UTC.

4

IP

NO

X.X.X.X

ip=X.X.X.X

IP for which the token will be valid

5

LOCATION

NO

XX-YY

location=XX-YY

Subdivision (will be used to enforce geoblocking)

Example Request URLs and matching token strings

Request URL

Token string we'll check against

/api/v2/streaming/events/12345/stream?auth=XXX×tamp=123456789&operatorId=Y&ip=1.1.1.1

/api/v2/streaming/events/12345/stream:SECRET:TIMESTAMP:1.1.1.1

/api/v2/streaming/events/123/stream?auth=XXX×tamp=123456789&operatorId=Y&cc=us-ny

/api/v2/streaming/events/123/stream:SECRET:TIMESTAMP:US-NY

Last updated