Suport de The Movie Database

I'm trying to use the Discover API. I know my API-Key is valid since the following works:

https://api.themoviedb.org/3/discover/movie?api_key=

But as soon as I start adding parameters, it fails ({"status_code":7,"status_message":"Invalid API key: You must be granted a valid key.","success":false}). When I use the "try it" with the parameters I really want to use, it works, but when I tried copying that URL and adjusting it to use my API-Key, I can't get it to work. For reference, the following are the parameters I really want to specify:

?include_adult=false ?include_video=false ?language=en-US ?primary_release_year=2023 ?with_genres=28|12|80|18|36|27|9648|878|53|10752 ?with_original_language=en

Here's the full URL as I built it with the parameters above:

https://api.themoviedb.org/3/discover/movie?api_key=?include_adult=false?include_video=false?language=en-US?page=1?primary_release_year=2023?with_genres=28|12|80|18|36|27|9648|878|53|10752?with_original_language=en

Can someone shed some light on this for please? I'm sure it's something simple that I'm just not used to (I'm a retired IT Nerd that spent a lot of years programming, but not in the web world). For example, are there mutually-exclusive parameters that I can't use together (I don't think so, but am obviously grasping) or are the parameters required to be specified in a specific sequence, etc?

Thanks, Mark

2 resposta (a les pàgines 1 de 1)

Jump to last post

You need to start HTTP parameters with a question mark ? but append them with an ampersand &.

https://api.themoviedb.org/3/discover/movie?api_key=###&include_adult=false&include_video=false…

OMG, I feel bad for even bothering you with that question, but THANK YOU Travis. Geez. It appears that the FINAL "&" is optional (in the browser it seems to be OK with or without it).

Of course, I used to have a little laminating saying by my desk while I was still working: "The only DUMB QUESTION is the one not asked."

Thanks again! I'm successfully calling web services now and it's working like a charm. Keep up the good work (site)!!!

No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.

Global

s centra la barra de cerca
p obre el menú del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les pàgines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la pàgina d’edició

A les pàgines de temporades

(fletxa dreta) ves a la temporada següent
(fletxa esquerra) ves a la temporada anterior

A les pàgines d'episodis

(fletxa dreta) ves a l'episodi següent
(fletxa esquerra) ves a l'episodi anterior

A totes les pàgines d'imatges

a obre la finestra d'afegir imatges

A totes les pàgines d'edició

t obre el selector de traducció
ctrl+ s envia el formulari

A les pàgines de debat

n crea un debat nou
w canvia l'estat de visualització
p canvia públic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) pàgina següent
(fletxa esquerra) pàgina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessió