Closed sebpeterson closed 1 year ago
Hello! Thanks very much for filing this issue. This behavior seems to be a bug that I think has something to do with a change in the way that scopes work since I originally wrote the code a couple of years ago. I'm going to have to figure out whether the bug is in the quickstart or the Pinterest API. In the meantime, please try this:
$ ./scripts/get_access_token.py -a testtoken -w
...
$ ./scripts/get_pin.py -a testtoken -p 1040190845164935873
The first command will save a token (called "testtoken") with some default scopes (user_accounts:read,pins:read,boards:read
). The second command uses this token to do the read. To create a pin, you'll need a token with (at least) pins:write scope. Run this command for help:
$ ./scripts/get_access_token.py --help
...and this command to see all of the supported scopes:
$ ./scripts/get_access_token.py -s help
Hey, so this worked:
$ ./scripts/get_access_token.py -a testtoken -w
$ ./scripts/get_pin.py -a testtoken -p 1040190845164935873
Cool, I guess I can use it like this for now ! Thanks a lot
PR #98 fixed this issue by changing get_pin
to request both pins:read and boards:read scope. That's necessary because GET /v5/pins returns information about boards. There are possibly some API endpoints where it might make sense to use just pins:read scope but (kind of ironically) reading a pin isn't one of them. :)
Hi, I am trying to create and update pins using the sdk. Followed the very nice readme to test the api-quickstart. I am sucessfull running these scripts:
$ ./scripts/get_access_token.py $ ./scripts/get_user_pins.py
But tring ot read or creat pin fails...
I am on trial account, so scopes should not be an issue for pins:read/write ... I don't get it. Any clues ? Cheers.