Getting started with OAuth 2.0 Playground
Google OAuth
2.0 Playground
Step 1:
Go to https://developers.google.com/oauthplayground/
and login.
Step 2:
Click on settings and select
OAuth flow as Server-side, OAuth endpoint as Google, Access token location as
Authorization header w/ Bearer prefix, and Access type as Offline.
Step 3:
Select https://www.googleapis.com/auth/userinfo.profile
from Google+ API v1 and click on Authorize APIs.
Step 4:
Click Accept to grant
permissions to Google OAuth 2.0 Playground service.
Step 5:
Observe that Authorization
code has been generated.
Step 6:
Click on Exchange
authorization code for tokens buttons to generate Refresh token and Access
token. Observe expiry time for access token.
Step 7:
Request URI has been passed is
youtube.com and you can see HTTP GET Method response.
Step 8:
Setting Request URI as https://www.googleapis.com/oauth2/v2/userinfo
will give the user info.
The Google OAuth 2.0 Playground is a free browser tool for experimenting with OAuth 2.0 flows. You pick scopes, step through the authorization and token exchange, and inspect each request and response, which makes the protocol much easier to follow.
It is useful for learning how access tokens and refresh tokens work, and for debugging API authorization before wiring the flow into your own application.
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
Comments
Post a Comment