Sprijin Bază de date filme (The Movie Database)

Hello, I sent a simple search query with my api key (used several times since feb. 2023) but today I get a 401 message. The following request is sent via a javascript fetch function: https://api.themoviedb.org/3/search/movie?api_key=myKey&language=fr&query=Charlie%27s+Angels did I miss something ? Thanks in advance for your advice Kind regards Joseph

4 răspunsuri (pe pagina 1 din 1)

Jump to last post

I moved from France to Tunisa a few months ago, so my IP and location have changed. Does this has to do with a 401 unauthorized status ?

I renewed the api key in my settings and it seems to work better (no error message) but the object returned below seems incomplete:

Response { type: "cors", url: "https://api.themoviedb.org/3/search/movie?api_key=MY_KEY&language=fr&query=Charlie%27s+Angels", redirected: false, status: 200, ok: true, statusText: "", headers: Headers(19), body: ReadableStream, bodyUsed: false } ​body: ReadableStream { locked: false } ​​locked: false ​​: ReadableStreamPrototype { cancel: cancel(), getReader: getReader(), pipeThrough: pipeThrough(), … } ​bodyUsed: false ​headers: Headers(19) { "access-control-allow-origin" → "", "access-control-expose-headers" → "", "alt-svc" → 'h3=":443"; ma=86400', … } ​​ ​​: HeadersPrototype { append: append(), delete: delete(), get: get(), … } ​ok: true ​redirected: false ​status: 200 ​statusText: "" ​type: "cors"

​url: "https://api.themoviedb.org/3/search/movie?api_key=MY_KEY&language=fr&query=Charlie%27s+Angels"

Is that a matter of timeout or something else ? ​

Hi @J.Ack, if that is the response you are getting to the query, it looks like you may be doing something wrong in constructing the query or reading the response. The status:200 means the query is working. Check and make sure you have "accept: application/json" in your query header and read this discussion to make sure you are waiting for and processing the response properly.

Hello @robbie3999, Thanks a lot for your answer: I made a confusion between 'key' and 'token' in the header option and now everything works fine ! Kind regards

Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.

Globale

s focalizează bara de căutare
p deschide meniul profilului
esc închide o fereastră deschisă
? deschide fereastra cu scurtături de la tastatură

Pe paginile media

b mergi înapoi (sau la părinte atunci când este cazul)
e mergi la pagina de editare

Pe paginile sezoanelor filmelor seriale

(săgeată dreapta) mergi la sezonul următor
(săgeată stânga) mergi la sezonul precedent

Pe paginile episoadelor filmelor seriale

(săgeată dreapta) mergi la episodul următor
(săgeată stânga) mergi la episodul precedent

Pe toate paginile de imagini

a deschide fereastra pentru adăugarea de imagini

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimite formularul

Pe paginile de discuții

n crează o discuție nouă
w comută starea de vizionare
p comută publică/privată
c comută închisă/deschisă
a deschide activitatea
r răspunde la discuție
l mergi la ultimul răspuns
ctrl+ enter trimite mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina precedentă

Setări

Doriți să evaluați sau să adăugați acest articol într-o listă?

Autentificare