The Movie Database Support

I tried to access with following javascript syntax:

'https://api.themoviedb.org/3/search/movie?api_key=###&query=' + $scope.MovieName + '&year=' + $scope.Year

what can I do now

4 replies (on page 1 of 1)

Jump to last post

This query is working fine with your API key (I've truncated it for privacy reasons):

https://api.themoviedb.org/3/search/movie?api_key=4d394ed********&query=star+wars&year=2017

What's the actual error you're getting?

When I run the HTML in server side, I get the following errors in console window

" HTTP401: DENIED - The requested resource requires user authentication.
(XHR)GET - https://api.themoviedb.org/3/movie/181808api_key=4d394ed****

 Possibly unhandled rejection: {"data":{"status_code":7,"status_message":"Invalid API key: You must be granted a valid key."},"status":401,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"https://api.themoviedb.org/3/movie/181808api_key=4d39****","headers":{"Accept":"application/json, text/plain, */*"}},"statusText":"Unauthorized","xhrStatus":"complete"}

2 SCRIPT12030: SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally"

You don't have a question mark, defining your query param. Here's the correct URL, notice the question mark.

https://api.themoviedb.org/3/movie/181808?api_key=4d394e******

OK, one small clarification, the syntax which was in the console log is different from what I have defined. I have given the correct syntax in the first message, 'https://api.themoviedb.org/3/search/movie?api_key=###&query=' + $scope.MovieName + '&year=' + $scope.Year how come it is changed in the console window https://api.themoviedb.org/3/movie/181808api_key=4d394ed**** which I have not defined in my javascript file.

Can't find a movie or TV show? Login to create it.

Want to rate or add this item to a list?

Login