Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pocket API: how to obtain the Access token

I'm trying to produce a web page showing my list of "Read it later" articles stored in Pocket, using their API, and following the directions published on their Documentation.

Step 1: have a consumer key. I created the Pocket App, and have the consumer_key.

Step 2: get an access token. This is where i get stuck. I'm supposed to send a POST request with the consumer_key and the redirect_uri, which i fail to understand. My script sits at domain.com/pocket/index.php, which is where i would like that the token be sent, so i'd assume the redirect_uri is that url. But in the documentation, they use something like "pocketapp12388:authorizationFinished" which does not look like a url to me.

In any case, whichever i use I get a "400 Bad Request", which means the redirect_uri is incorrect. What am i doing wrong?

Here is a small demo on jsfiddle.net

like image 218
pixeline Avatar asked Oct 05 '22 17:10

pixeline


1 Answers

if you need access token use https://github.com/jshawl/pocket-oauth-php open config.php put you consumer_key and redirect_uri (path.to/callback.p h p) and start path.to/connect.p h p sorry for my english))

like image 90
alex Avatar answered Oct 10 '22 03:10

alex