תמיכת The Movie Database

Api is not working, we get axios error 404 (AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest)

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

Jump to last post

@kartikey12 said:
/search/multi
Api is not working, we get axios error 404 (AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest)

It makes solving your problem much easier when you post the API Request used here.
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.

Indeed @kartikey12, you can see here your request is working properly (replace ### with your API key):

https://api.themoviedb.org/3/search/multi?api_key=###&query=star+wars

With regards to Axios, unless somebody who is familiar with Axios comes across this, you might not get the help you're looking for. I usually recommend heading over to Stack Overflow where you can ask a specific question to those familiar with the technology you're using.

I am still getting error 404 using this code.

 fatchDataFromApi(`/search/multi?api_key=###&query=${query}&page=${pageNum}`).then(
        (res) => {
            setData(res);
            setPageNum((prev) => prev + 1);
            setLoading(false);

        }
    );

A 404 error usually means you messed up the path and not the query. I see you are using

/search/multi?

maybe you need

/3/search/multi?

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

עולמי

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

בדפי מדיה

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

בדפי עונות

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

בדפי סדרות

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

בכל דפי תמונה

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

בכל דפי עריכה

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

בדפי דיון

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

הגדרות

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

היכנס