Well, should anyone stumble across this thread in the future looking for help, the answer is "oob".
Each site apparently makes up their own term for redirect_uri when being accessed from an application instead of a webserver. For Yahoo it's "oob", for google it's "urn:ietf:wg:oauth:2.0:oob"
One other thing to be aware of, if you're using LWP::Authen::OAuth2 and it's not one of the 4 sites natively supported, you need to find the authorization and token endpoint addresses and declare them when you make your oauth2 object.
At this point I'm able to summon an Authorization Code, however when attempting to exchange it for a token I'm getting
"OAuth2 error: INVALID_INPUT Description: Redirect URL cannot be empty for authorization_code grant type at C:\Sustaining\Perlinprogress\Football\oauth.pl line 105."
my $oauth2 = LWP::Authen::OAuth2->new( authorization_endpoint => 'https://api.login.yahoo.com/oauth2/requ +est_auth', token_endpoint => 'https://api.login.yahoo.com/oauth2/get_token', client_id => '****', client_secret => '****', scope => 'fspt-w', redirect_uri => 'oob', ); my $url = $oauth2->authorization_url(); my $code = prompt('x', 'Paste the code obtained at the above URL here: + ', '', ''); # Exchange the code for an access token: my $token = $oauth2->request_tokens(code => $code) or die; # If we get to here, it worked! Report success: print "\nToken obtained successfully!\n"; print "Here are the token contents (just FYI):\n\n"; print $token->to_string, "\n";
In reply to Re: Oauth2 help needed
by superwombat
in thread Oauth2 help needed
by superwombat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |