The Movie Database-ondersteuning

I read the docs here: https://developers.themoviedb.org/3/account/get-favorite-movies

/account/{account_id}/favorite/movies

Is the {account_id} seems to require an Int so it's not the same as the username, and I can't find it anywhere under my profile. Where can I find this info?

My Favorites list is set to public too, so I'm guessing I don't need to set a bearer token, right?

5 antwoorden (op pagina 1 van 1)

Jump to last post

How to obtain your account_id

There needs to be a good tutorial on how to retrieve the account_id because there's several steps on how to get there.

  • You need to start here: https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id and follow these instructions.
  • Use Postman instead of the on-page generator, otherwise you may run into CORS issues.
  • Be sure to pay attention to what is a GET versus a POST request.
  • You'll need your API key for everything so be sure to create an app if you haven't already. https://www.themoviedb.org/settings/api

I'll try to recall the steps –

1. Get your Request Token (docs)

https://api.themoviedb.org/3/authentication/token/new?api_key=blahblahblah

Plug that URL into Postman as a GET request and run it.

You should now have your Request Token.

2. Create your session_id

https://api.themoviedb.org/3/authentication/session/new?api_key=blahblahblah

Add that to Postman as a POST Request. Also within Postman's Body tab, you need to add your request_token as raw JSON.

It will look something like the following:

{
  "request_token": "xxxxxxxxxxxxxx"
}

Run the request and should get back your session_id.

3. Retrieve your account details (docs)

Back in Postman add your URL as GET request.

https://api.themoviedb.org/3/account?api_key=blahblahblah&session_id=xxxxxxxxxxx

This should return some JSON, and within it the id which is your account_id:

{
    "avatar": {
        "gravatar": {
            "hash": "00000000000000000"
        },
        "tmdb": {
            "avatar_path": null
        }
    },
    "id": 1234567,
    "iso_639_1": "en",
    "iso_3166_1": "US",
    "name": "",
    "include_adult": true,
    "username": "meme"
}

Enjoy!

Good run through, thanks @djmtype.

Did everything right upto 2, but postman is showing session denied status message, what should I do in that case?

You can check out some test scripts I have below, which have all the functionality to get this done. All of the code is client side JS so inspect the code to see what's happening.

Cheers.

@travisbell said:

You can check out some test scripts I have below, which have all the functionality to get this done. All of the code is client side JS so inspect the code to see what's happening.

Cheers.

Thank you Travis Bell

Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.

Wereldwijd

s focus op zoekbalk
p open profielmenu
esc sluit een open venster
? open sneltoetsen venster

Op media pagina's

b ga terug (of ga naar bovenliggend item)
e ga naar beweken

Op tv-seizoenspagina's

(rechter pijl) ga naar volgende seizoen
(linker pijl) ga naar vorig seizoen

Op pagina's met tv-series

(rechter pijl) ga naar volgende aflevering
(linker pijl) ga naar vorige aflevering

Op alle afbeeldingspagina's

a open venster afbeelding toevoegen

Op alle bewerkte pagina's

t open vertaalmenu
ctrl+ s verstuur formulier

Op discussiepagina's

n start nieuwe discussie
w Verander kijk status
p privé of openbaar
c schakelen sluiten/openen
a open activiteit
r beantwoord discussie
l ga naar laatste antwoord
ctrl+ enter verstuur uw bericht
(rechter pijl) volgende pagina
(linker pijl) vorige pagina

Instellingen

Want to rate or add this item to a list?

Inloggen