Overview

There are three ways to authenticate your app with The Movie Database (TMDB) API. They include the following:

  1. Application level authentication (ALA) - Default method.
  2. User authentication.
  3. Guest sessions.

Application level authentication would generally be considered the default way of authenticating yourself on the API. You can authenticate with either your api_key, or by using your access_token as a bearer token.

Access Token

The default method to authenticate is with your access_token. This token is expected to be sent along as an Authorization header. A simple cURL example using this method looks like the following:

Example
curl --request GET \
     --url 'https://api.themoviedb.org/3/movie/changes' \
     --header 'Authorization: Bearer <your-access-token e.g eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMDJlNzYzODBkM2NiZGVmMmY2NjQzNzg3ZjkyMzZmYiIsIm5iZiI6MTczMzE3MDMzNi4yNDYsInN1YiI6IjY3NGUxNGEwMGU4M2U0YmUyNTJjZWQyZiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.ZT61q1NoOlzVMBVMZJQ2sSZZQ7P7KZmtr8Vw19C0Ies>'

API Key

The API Key is the second authentication method. Although, it cannot be used for all endpoints. Use the api_key over the access_token only when you really need to. For example, the Get account details endpoint uses an API Key. A simple cURL example using the api_key looks like the following:

Example
curl --request GET \
     --url 'https://api.themoviedb.org/3/movie/changes?api_key=79191836ddaa0da3df76a5ffef6f07ad6ab0c641' 

How to get authentication credentials (API key and bearer token)

Please note that the API registration process is not optimized for mobile devices so you should access these pages on a desktop computer and browser.

1

Login to your TMDB dashboard

Create a TMDB account or login to access your dashboard

2

Click your profile icon at the top right corner and select settings

3

Select the API tab on the settings page

4

Tap 'click here' under 'Request an API Key'

5

Select the developer option (suitable for starters or non-profit use)

6

Agree to the Terms of service

7

Fill in the application form on the new page (you can use any of your social links as the website URL)

After submitting the application, you can access both your API key and Bearer token as seen below: