When using Motto’s Content Delivery API, you will need to authenticate any requests the client makes. This document explains how to do that.

Public key

To authenticate with Motto’s Content Delivery API, you should always provide a standard Authorization: Bearer <PUBLIC_KEY> HTTP header. The PUBLIC_KEY is required and is connected to your Motto project. It allows your end-users to retrieve any public resource inside of that particular project.

User authentication

The public key as it is described above only authenticates a client to access resources within a project; it does not authenticate a user individually.

To authenticate a user with Motto’s Content Delivery API, you should provide a non-standard X-Motto-Token: <JWT> HTTP header. The JWT is a JSON Web Token that should be generated after the user signs in to a Motto-powered OTT platform application.

Generating a JWT

A user may sign into a Motto-powered OTT platform application using a variety of methods, depending on the platform setup, and each of these methods has a different way of generating the JWT.