Поддръжка на The Movie Database

My API key isn't working for some reason and I'm baffled -
the one I'd been using stopped working so i generated a new one,and while it works on the URL test:
https://api.themoviedb.org/3/movie/550?api_key=THE_KEY (replacing THE_KEY shows the Fight Club movie info).
on the authentication validate test it says "sorry you couldn't be authenticated with those credentials"
and produces 401 error code 7 "Invalid API key: You must be granted a valid key."
for both the API key test and Access Token test.
https://developer.themoviedb.org/reference/authentication-validate-key.
Any ideas?

9 отговора (на страница 1 от общо 1)

Jump to last post

Update -
the https://developer.themoviedb.org/reference/authentication-validate-key link now validates the Access Token (status 200),
but still not the API Key (status 401).
The API Key still works in the Fight Club URL test though.

I'm seeing the same thing since at least 2 hours ago (November 29th). As far as I can tell neither token nor API key is working. Last time I used it (2 days ago) it was working.

Edit: turned out to be user error.

same issue for me , works for fight club example but not while testing or using postman, is there any fix to this ? please help

@ajkfa said:
API Key isn't working
My API key isn't working for some reason and I'm baffled -
the one I'd been using stopped working so i generated a new one,and while it works on the URL test:
https://api.themoviedb.org/3/movie/550?api_key=THE_KEY (replacing THE_KEY shows the Fight Club movie info).
on the authentication validate test it says "sorry you couldn't be authenticated with those credentials"
and produces 401 error code 7 "Invalid API key: You must be granted a valid key."
for both the API key test and Access Token test.
https://developer.themoviedb.org/reference/authentication-validate-key.
Any ideas?

Update -
the https://developer.themoviedb.org/reference/authentication-validate-key link now validates the Access Token (status 200),
but still not the API Key (status 401).
The API Key still works in the Fight Club URL test though.

I assume you are testing/using "Try it!" in the documentation.

The "Try it!" option in DOCs it only works with the "Access Token Auth" option.
It doesn't work if you select the "API Key Auth" option.
It is a birth defect since the migration to this service.
I don't know if it can be fixed. I'm not a programmer.
Your API Key validation test is done using your Token.
https://developer.themoviedb.org/reference/authentication-validate-key
If your Token works then your API Key must also work.
If you want to test your API Key directly, follow the instructions below.

Take a Test
Using a computer, desktop or notebook.
On some mobile devices this test may not work correctly.
In the URL below, change THE_KEY to your API Key.
https://api.themoviedb.org/3/movie/550?api_key=THE_KEY
Use this example to do a search using a new tab or window in your browser.
You will receive the basic data of the Movie Fight Club (1999)
https://www.themoviedb.org/movie/550-fight-club
If it works, your Key is OK.

When there is a problem, the TMDb Server sends a message.
Can you tell which message the server sent?
Here is a list of possible messages:
https://developer.themoviedb.org/docs/errors

If it does not work, let us know right here.

@arnavsawant.19 said:
same issue for me ,
works for fight club example
but not while testing

Read the answer above.

or using postman,
is there any fix to this ?
please help

As for Postman we need more information.
You need to give more details about the problem.

Problems with API Request

In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.

Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.

this is the request :

export const fetchFromTMDB = async (url) => {
    const options = {
        headers: {
            accept: "application/json",
            Authorization: "Bearer" + ENV_VARS.TMDB_API_KEY,
        },
    };
export async function getMovieTrailers(req, res) {
    const {id} = req.params;  
    try {
        const data = await fetchFromTMDB(https://api.themoviedb.org/3/movie/${id}/videos?language=en-US);

can u help me out here ?

@arnavsawant.19 said:

this is the request :

export const fetchFromTMDB = async (url) => {
  const options = {
      headers: {
          accept: "application/json",
          Authorization: "Bearer" + ENV_VARS.TMDB_API_KEY,
      },
  };
export async function getMovieTrailers(req, res) {
  const {id} = req.params;  
  try {
      const data = await fetchFromTMDB(https://api.themoviedb.org/3/movie/${id}/videos?language=en-US);

can u help me out here ?

I'm not a code programmer.
But I see something that might be the problem.
In this variable below:

Authorization: "Bearer" + ENV_VARS.TMDB_API_KEY,

Are you using your API Key or your Token?

Im using the token (the long key infront of the bearer statement ), just named it as key

@arnavsawant.19 said:
Im using the token (the long key infront of the bearer statement ), just named it as key

You probably get some error message.
Can you post the text of the error message here?
Maybe a Postman user can help,

Не можете да откриете филм или сериал? Влезте, за да го създадете.

Глобални

s фокусиране на лентата за търсене
p отваряне на меню "Профил"
esc затваряне на отворен прозорец
? отваряне на прозореца за клавишните комбинации

На страниците за медиите

b връщане назад
e към страницата за редактиране

На страниците за сезони

(стрелка надясно) към следващ сезон
(стрелка наляво) към предишния сезон

На страниците за епизоди

(стрелка надясно) към следващ епизод
(стрелка наляво) предишен епизод

На всички страници за изображения

a отваряне на прозорец за добавяне на изображение

На всички страници за редактиране

t меню за избор на език, на превода
ctrl+ s изпращане на форма

На страниците за дискусия

n създаване на нова дискусия
w статус на наблюдаване
p публична/лична
c затваряне/отваряне
a отваряне на действия
r отговаряне в дискусия
l към последния отговор
ctrl+ enter изпращане на вашето съобщение
(стрелка надясно) следваща страница
(стрелка наляво) предишна страница

Настройки

Искате ли да го оцените или добавите към списък?

Вход