Soporte de 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 respuestas (en la página 1 de 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?

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión