Login   Register  
PHP Classes
elePHPant
Icontem

oAuth with just access token

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP OAuth API  >  All threads  >  oAuth with just access token  >  (Un) Subscribe thread alerts  
Subject:oAuth with just access token
Summary:Example code
Messages:4
Author:Marc Godard
Date:2013-05-14 03:44:43
Update:2013-06-15 12:13:24
 

  1. oAuth with just access token   Reply  
Picture of Marc Godard
Marc Godard
2013-05-14 03:44:43
Hi,

First of all thanks for this package. In the description you mentioned that I can get access to a resource if I have just the access token for it.

Example: Someone logged in with twitter on a mobile phone, the phone sends me the access token and my server can then look up what it needs.

I have looked through many of your file and can't seem to find an example of this? I am sure I can work it out, but help would probably speed that up.

Thanks again,

M

  2. Re: oAuth with just access token   Reply  
Picture of Manuel Lemos
Manuel Lemos
2013-05-14 05:40:54 - In reply to message 1 from Marc Godard
That requires to set the the redirect_uri to 'oob'. That will make Twitter show a PIN number that the user needs to enter in your site somehow so you can send a signed request to get the access token.

That last part is not yet implemented in the class, but I can implement it soon and probably write an article about it. Please be patient.

  3. Re: oAuth with just access token   Reply  
Picture of qiang
qiang
2013-05-27 03:35:05 - In reply to message 2 from Manuel Lemos
Hello, Manuel Lemos
First of all , thanks for your class.
I want to use your class for odesk api integration, but can't get access token.

I set those values.

$client->redirect_uri = 'http://'.$_SERVER['HTTP_HOST'].
dirname(strtok($_SERVER['REQUEST_URI'],'?')).'/login_with_odesk.php';

$client->client_id = 'af80152e5fa61ad20af07e89db00XX';

$client->client_secret = 'b0929aefeb75a579XXX';
$client->oauth_version = '1.0';
$client->request_token_url = 'https://www.odesk.com/api/auth/v1/oauth/token/request';

$client->access_token_url = 'https://www.odesk.com/api/auth/v1/oauth/token/access';
$client->dialog_url = 'https://www.odesk.com/services/api/auth';
$client->token_request_method = 'POST';
$client->url_parameters = true;

$client->scope = '';

After process() function , I got 401 error.
Do you have any clues for that?
Thanks for your time.
Qiang

  4. Re: oAuth with just access token   Reply  
Picture of Manuel Lemos
Manuel Lemos
2013-06-15 12:13:25 - In reply to message 3 from qiang
This is a separate issue. Can you please post a message in a new thread so I can answer it there?

http://www.phpclasses.org/post_forum_message.html?package=77 ...