Trakt
- Trakt Client ID and Access Token
- Go to the Trakt Developer Applications page.
- Fill out the form with the following information:
- Name: Your app name (e.g., "My Trakt Watchlist App").
- Description: A short description of your app.
- Redirect URI:
urn:ietf:wg:oauth:2.0:oob
(This is used for non-web apps). - Click Save App.
- Go to the Trakt API Authentication page.
- Click Yes, Allow to get a PIN.
- Use the following Python script to exchange the PIN for an access token:
- Replace
YOUR_CLIENT_ID
,YOUR_CLIENT_SECRET
, andYOUR_PIN
with your actual values. - Run the script to get the Access Token.
a. Create a Trakt Account: Go to Trakt.tv and sign up for an account if you don't already have one.
b. Create a New Application:
c. Get Client ID: After saving the app, you'll see your Client ID. Copy this value.
d. Get Access Token:
pythonimport requests CLIENT_ID = 'YOUR_CLIENT_ID' CLIENT_SECRET = 'YOUR_CLIENT_SECRET' PIN = 'YOUR_PIN' url = 'https://api.trakt.tv/oauth/token' data = { 'code': PIN, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET, 'redirect_uri': 'urn:ietf:wg:oauth:2.0:oob', 'grant_type': 'authorization_code' } response = requests.post(url, data=data) print(response.json())
TMDB API Key
a. Create a TMDB Account: Go to The Movie Database (TMDB) and sign up for an account if you don't already have one.
b. Create a New API Key:
- Go to your TMDB Account Settings.
- Click Create in the API section.
- Fill out the form with the necessary information and click Submit.
- You'll receive your API Key. Copy this value.