![]()
URL:
https://api.login.yahoo.com/oauth/v2/request_auth
Supported Methods:
GET, POST
After getting the Request Token from Yahoo!, your application presents to your Users a Yahoo! authorization page (OAuth Core 1.0 Spec, Section 6.2) asking them to give permission to your application to access their data.
The authorization page will only ask for permission to a limited amount of User data, based on the access scopes you specified during the initial registration process.
The following is an example of a authorization URL that includes the Request Token:
https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token=j5nyp6
Table 4.3. Request Auth (request_auth) Request Parameters
| Request Parameter | Description |
|---|---|
oauth_token |
The Request Token that Yahoo! returns as a response to the
request_token call. The Request Token is required during the User
authorization process.
|
The following parameters are appended to the callback URL, if one is provided in Step 2:
Table 4.4. Request Auth (request_auth) Callback URL Parameters
| Callback URL Parameter | Description |
|---|---|
oauth_token |
The Request Token that Yahoo! returns as a response to the
get_request_token call. It is appended to the authorization page URL. The
Request Token is required during the User authorization process.
|
oauth_verifier |
The OAuth Verifier is a verification code tied to the Request Token. The OAuth
Verifier and Request Token both must be provided in exchange for an Access Token. They
also both expire together. If the oauth_callback is set to oob
in Step 2, the OAuth Verifier is not
included as a response parameter and is instead presented once the User grants
authorization to your application. Yahoo! instructs the User to enter the OAuth
Verifier code in your application. Your application must ask for this OAuth Verifier
code to ensure OAuth authorization can proceed. The OAuth Verifier is intentionally
short so that a User can type it manually.
|
You have two methods for presenting the Yahoo! authorization page:
When using the pop-up window method, you must follow these guidelines:
xoauth_request_auth_url.oauth_callback, passing the OAuth Verifier
(oauth_verifier).
The following example uses the Yahoo! Social API PHP SDK to open a pop-up window, listen for an authorization, close the popup, and refresh the originating page:
With this method, you must directs Users off-site to the Yahoo authorization page
as indicated in xoauth_request_auth_url. Once the User authorizes access,
Yahoo! redirects Users to the URL as indicated in oauth_callback.
Because the Yahoo! authorization page is meant to be shown as a pop-up window, it will appear centered and constrained within a full browser window.
If your application does not have access to a browser, it must provide the User with the Yahoo! authorization page URL and Request Token, both provided in Step 2. Your application must provide directions for your User to manually browser to the URL and enter the provided Request Token.