TMDB API uses Application level authentication. You can either authenticate with an api_key or by using your access token as a Bearer token.
To learn how to obtain these credentials, please visit the Authentication page for details.
Using the bearer token has an added benefit of being a single authentication process that you can
use across both the v3 and v4 methods.
To authenticate with your bearer token, you’ll have to obtain the API Read Access Token
from your dashboard (see obtain api key), then send it along as an Authorization header - See cURL example below.
The endpoints in Authentication section of this docs allows you to authenticate users so they can do things like, rate movies,
add to favourite, as well as create and edit custom list in your application
while staying in sync with their TMDB account.This is controlled with a session_id parameter.
Follow the steps below to generate a session_id:
The create-request-token endpoint allows you to request a new token.
This is a temporary token, required to ask the user for permission to access their account
and will expire automatically after 60 minutes, if not used.example request token
This will enable the TMDB user to approve your request from their end.You can also add a redirect parameter to the url if you have a page you want the user to arrive at, after authenticating.
Once the request token has been approved by the user, use the create-session endpoint,
with the approved request token as body parameter, to request for a session_id.
You will need the session_id as a parameter for subsequent requests.
So you should treat it like a password and keep it safe.
Guest sessions are special kind of session that gives users the functionality of an account
like, rate a movie etc. without having a registered account on TMDB.To create a Guest session, use the create-guest-session endpoint. If the request is successful,
you will recieve a guest session_id like so:
Guest sessions will automatically be deleted if they are not used withn 60 minutes of being issued.
This is a unique Id for a user’s account and a required parameter for all accounts endpoints.
It allow users to add or remove personalized informaton from a users account, and is
automatically generated once a user logs in to their TMDB account.