Служба підтримки The Movie Database

I am trying to get a new token by calling:https://api.themoviedb.org/authentication/token/new?api_key= with my api_key in order to create a login system for a sample app which I am building right now using TMBd's API. Calling this directly returns an error, a html code. Those are the headers:

<-- 404 https://api.themoviedb.org/authentication/token/new?api_key={MY_API_KEY} (345ms)
content-type: text/html
content-length: 150
date: Mon, 18 Jan 2021 15:33:58 GMT
server: openresty
vary: Accept-Encoding
x-cache: Error from cloudfront
via: 1.1 3dbbfa4162b66eaa43240b1b3dccc724.cloudfront.net (CloudFront)
x-amz-cf-pop: SOF50-C1
x-amz-cf-id: 19f9-oPLWD_lO31Q_BOD2mM3HBQbqaJcaTjZhWSEwLHwaogamdWtmQ==
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>openresty</center>
</body>
</html>
<-- END HTTP (150-byte body)

Any idea what can cause this issue? Thanks!

3 відповідей (на сторінці 1 із 1)

Jump to last post

Hey @hardartcore, it's because you're not accessing the correct path (missing the /3).

You're looking for:

https://api.themoviedb.org/3/authentication/token/new

Hi @travisbell . Yes, you are right, that was the problem. It turns out that the library which I am using for the http connection strips the last part of the main url which in my case was set to: https://api.themoviedb.org/3/ but when I copied the rest of the part of token creating url: /authentication/token/new I didn't remove the first / and the whole url becomes: https://api.themoviedb.org/3//authentication/token/new which leads to removing the /3/ part. And in the debug logs I was mostly checking about the api_key if it's the correct one because with other API call there wasn't any error. Thanks for helping me to find the issue!

Regards.

hey @travisbell please help me. My application is working fine locally. But on deploying my application on vercel and On approving third-party authentication request on tmdb authentication page, it shows on redirecting to https://movieshubwithai.vercel.app/approved?request_token=b4870f4c718190be69b3c7bbdd3fcb21f930cd79&approved=true, it shows 404: NOT FOUND and the error : GET https://movieshubwithai.vercel.app/approved?request_token=b4870f4…&approved=true 404 (Not Found) Any idea how? Any more details required?

Не вдалося знайти фільм або серіал? Увійдіть, щоб додати.

Загальні

s відкрити панель пошуку
p відкрити меню профілю
esc закрити відкрите вікно
? відкрити вікно з гарячими клавішами

На сторінках медіа

b повернутися назад
e перейти до сторінки редагування

На сторінках сезонів шоу

(стрілка вправо) перейти до наступного сезону
(стрілка вліво) перейти до попереднього сезону

На сторінках серій шоу

(стрілка вправо) перейти до наступної серії
(стрілка вліво) перейти до попередньої серії

На всіх сторінках зображень

a відкрити вікно додавання зображення

На всіх сторінках редагування

t відкрити перемикач перекладів
ctrl+ s підтвердити форму

На сторінках обговорення

n створити нове обговорення
w змінити статус стеження
p перемикач публічно/приватно
c перемикач відкрито/закрито
a відкрити активність
r відповісти на обговорення
l перейти до останньої відповіді
ctrl+ enter підтвердити повідомлення
(стрілка вправо) наступна сторінка
(стрілка вліво) попередня сторінка

Налаштування

Хочете поставити оцінку чи додати до списку?

Увійти

Немає облікового запису?

Приєднайтеся до спільноти