The Movie Database Подршка

Hi,

I am trying to fetch a user's recommended movies from the V4 API. i.e. this...

https://api.themoviedb.org/4/account/<ACCOUNT_OBJECT_ID>/movie/recommendations?page=1&language=en-US

But I keep getting...

{
  "success": false,
  "status_code": 39,
  "status_message": "This resource is private."
}

What I've done so far, and it all works to authenticate my user with my app's read access token is

  1. Create request token: https://api.themoviedb.org/4/auth/request_token
  2. With the request token, create the access token: https://api.themoviedb.org/4/auth/access_token
  3. After the user has been re-directed back to my app, I create a v3 session, with the V4 access token: https://api.themoviedb.org/3/authentication/session/convert/4
  4. Everything is successful, and I store the user's V4 account ID and access token along with the v3 session in my app secretly.

When I call:

https://api.themoviedb.org/3/account?session_id=<SESSION_ID>

it comes back with success, and I retrieve the user's account details

But then next I call (with the user's V4 account object id I retrieved earlier in step 2, with my app's read access token as the auth header):

https://api.themoviedb.org/4/account/<ACCOUNT_OBJECT_ID>/movie/recommendations?page=1&language=en-US

I get the error 401 status_code 39.

The user has authenticated with my app, so I would expect the app (or my read access token API key) to be authorized to get that data.

I can't figure out if something is broken, or if I've missed something. Any clues?

1 одговор (на страни 1 од 1)

Jump to last post

Ok, I think I now know what I need to do...

So I need to use the user's access token from step 2, as my auth bearer header instead of my application one for this to work.

So my understanding is that once the user authenticates with my app, and I get an access token, then I now swap out my application authorization key with the user's access one for as long as they are logged in (or at least for the calls that need user level of authentication)?

Не можеш да нађеш филм или серију? Пријави се да додаш.

Глобално

s фокусирај траку за претрагу
p отворите мени профила
esc затворити отворени прозор
? отвори прозор пречице на тастатури

На страницама медија

b вратити се назад (или родитељу кад је то применљиво)
e иди на страницу за уређивање

На страницама ТВ сезона

(стрелица надесно) пређите на следећу сезону
(лева стрелица) иди на претходну сезону

На страницама ТВ епизода

(стрелица надесно) пређите на следећу епизоду
(лева стрелица) иди на претходну епизоду

На свим страницама са сликама

a отвори прозор за додавање слике

На свим страницама за уређивање

t отвори селектор превода
ctrl+ s пошаљи образац

На страницама за дискусију

n отвори нову дискусију
w мења статус гледања
p мења јавно/приватно
c мења отвори/затвори
a отвори активност
r одговор на дискусију
l иди на последњи одговор
ctrl+ enter пошаљи поруку
(стрелица надесно) следећа страница
(лева стрелица) претходна страница

Подешавања

Желите ли да оцените или додате ову ставку у листу?

Пријави се