Suporte do 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 respostas (na página 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)!!!

Não consegue encontrar um certo filme ou série? Inicie sessão e adicione-o.

Geral

s focus the search bar
p abrir menu do perfil
esc close an open window
? open keyboard shortcut window

Em páginas de Média

b go back (or to parent when applicable)
e ir para a página de edição

Em páginas de temporadas de séries

(seta para a direita) ir para a próxima temporada
(seta para a esquerda) ir para a temporada anterior

Em Páginas de Episódios de Séries

(seta para a direita) ir para o próximo episódio
(seta para a esquerda) ir para o episódio anterior

Em Todas as Páginas de Imagens

a abrir janela para adicionar imagem

Em Todas as Páginas de Edição

t open translation selector
ctrl+ s submit form

Em Páginas de Discussão

n criar uma nova discussão
w toggle watching status
p toggle public/private
c toggle close/open
a abrir actividade
r reply to discussion
l ir para a última resposta
ctrl+ enter submit your message
(seta para a direita) página seguinte
(seta para a esquerda) página anterior

Definições

Deseja classificar ou adicionar este item a uma lista?

Iniciar Sessão

Ainda não é um membro?

Crie uma Conta e Adere a Comunidade