This example is taken from list add items page. The url should be "https://api.themoviedb.org/4/list/list_id/items" instead of "https://api.themoviedb.org/4/list_id/items".
const axios = require('axios');
const options = {
method: 'POST',
url: 'https://api.themoviedb.org/4/list_id/items',
headers: {
accept: 'application/json',
'content-type': 'application/json',
Authorization: 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhYTYzOWRkNWY0NmU1N2M5YTJkNDY5MzlkZGE1OTYxOSIsInN1YiI6IjY1NDYyNjM0NDFhNTYxMzM2ZDg0MzlhZiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.2cdP4naZMke4IQDr_Lt4e86H6jDuZ8d0nGWq75OqdUk'
},
data: {
items: [
{media_type: 'movie', media_id: 550},
{media_type: 'movie', media_id: 244786},
{media_type: 'tv', media_id: 1396}
]
}
};
axios
.request(options)
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.error(error);
});
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de Raghavan
le 20 novembre 2023 à 06h16
Also i have a doubt. I got my access token from this script http://dev.travisbell.com/play/v4_auth.html and even added some movies to my list through the api. will my access token expire? if yes how long will it take?
Réponse de Travis Bell
le 20 novembre 2023 à 10h59
Good catch, I've updated the docs.
No, access tokens do not expire.