תמיכת The Movie Database

Hi

i am following this guide: https://developer.themoviedb.org/reference/authentication-how-do-i-generate-a-session-id.

But when i want to create a new session it says

{
    success: false,
    status_code: 34,
    status_message: 'The resource you requested could not be found.'
  }

In Step 3 it says, call the session new method with the approved request token.

So this is my code:

const response = await fetch(
      "https://api.themoviedb.org/3/authentication/session/new/",
      {
        method: "POST",
        headers: {
          accept: "application/json",
          "content-type": "application/json",
          Authorization:
            "Bearer myBearerToken",
        },
        body: JSON.stringify({
          request_token: my_request_roken,
        }),
      }
    )
      .then((res) => res.json())
      .then((json) => json);

And this is what i receive from the api

response: {
    success: false,
    status_code: 34,
    status_message: 'The resource you requested could not be found.'
  }

3 תגובות (בדף 1 מתוך 1)

Jump to last post

You have a trailing slash.

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

Should be:

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

Cheers.

its not working bro

Are you sure of this line ?

          request_token: my_request_roken,

You use "roken" instead of "token".

.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם

עולמי

s התמקד בשורת החיפוש
p פתח תפריט פרופיל
esc סגור חלון פתוח
? פתח חלון קיצורי דרך של מקלדת

בדפי מדיה

b לך חזרה (או אל הורה אם ישים)
e לך אל דף עריכה

בדפי עונות

(חץ ימני) לך אל העונה הבאה
(חץ שמאלי) לך אל העונה הקודמת

בדפי סדרות

(חץ ימני) לך אל הפרק הבא
(חץ שמאלי) לך אל הפרק הקודם

בכל דפי תמונה

a פתח חלון הוספת תמונה

בכל דפי עריכה

t פתח בוחר תרגום
ctrl+ s הגש טופס

בדפי דיון

n צור דיון חדש
w עורר מעמד צפייה
p עורר ציבורי/פרטי
c עורר סגירה/פתיחה
a פתח פעילות
r השב אל דיון
l לך אל תשובה אחרונה
ctrl+ enter הגש את הודעתך
(חץ ימני) הדף הבא
(חץ שמאלי) הדף הקודם

הגדרות

?רוצה לדרג או להוסיף פריט אל רשימה

היכנס