Você está na página 1de 1

OAuth 2.

0 Playground

1 of 1

https://developers.google.com/oauthplayground/?code=4/5qZVkmoVtl...

For better experience using the Drive API, make sure you have installed the OAuth 2.0 Playground Drive app on the Chrome Webstore. Dismiss

naveenn042@gmail.com Sign out

Playground
OAuth 2.0
Reset all settingsHelp - Feedback - Bugs Create Link OAuth 2.0 Configuration
Report a bug - Provide feedback
Here is a URL to initialize the playground with the current
OAuth 2.0 configuration
configuration:
Contact the team - Ask for help
Close

OAuth flow:

Server-side

https://developers.google.com/oauthplayground/#step1&apisSelect=https%3A//www.googleap

Server-side
Client-side

Include OAuth credentials and OAuth tokens in the link


Note: If the option above is enabled this link may contain your
OAuth
OAuth credentials and OAuth tokens. In that case avoid sharing
this link.
endpoints:
Close

Token endpoint:

Google
Google endpoint:
Authorization
Custom

Note: The OAuth endpoints above need to implement the OAuth 2.0 draft 10 specification or above. Other specification are likely to be incompatible.
Access token location: Authorization header w/ Bearer
prefix
Authorization header w/
OAuth prefix
Authorization header w/
Bearer prefix
access_token URL parameter
Access type: Offline
Request / Response
Offline
No
request.
Online

Step 1 Select & authorize APIs

HTTP/1.1 302 Found


Location: https://accounts.google.com/o/oauth2/auth?redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground&response_type=code&client_id=407408718192.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadsensehost&

Select the scope for the APIs you would like to access or input your own
Force approval prompt
OAuth
below. Then
click the "Authorize
button.
Step 2scopes
Exchange
authorization
code forAPIs"
tokens
Use your own OAuth credentials
GET /oauthplayground/?code=4/5qZVkmoVtlwm8k1bmydaJfHuzdA9FfRz3-iquE-gTWA.IrJKHLvjNVkdcp7tdiljKKbx-v3ZmgI HTTP/1.1
Once you got the Authorization Code from Step 1 click the Exchange
1
You
willan
need
to list
the URL
https://developers.google.com/oauthplayground as a valid redirect URI in your Google APIs Console's project. Then enter the client ID and secret assigned to a web application on your project below:
Host:
developers.google.com
authorization code for tokens button, you will get a refresh and
access
token which is required to access OAuth protected resources.
OAuth Client ID:
Ad Exchange Buyer API v1.3
Manage your Ad Exchange buyer account configuration
Authorization code:
OAuth Client secret:
https://www.googleapis.com/auth/adexchange.buyer
Ad Exchange Seller API v2.0
Note: Your credentials will be sent to our server as we need to proxy the request. Your credentials will not be logged.
View and
manage your Ad Exchange data
Refresh
token:
https://www.googleapis.com/auth/adexchange.seller
Close
Access
token:
View your
Ad Exchange data
https://www.googleapis.com/auth/adexchange.seller.readonly
Auto-refresh the token before it expires.
AdSense Host API v4.1
The access token will expire in seconds.
View and manage your AdSense host data and associated accounts
The access token has expired.
Note: The OAuth Playground does not store refresh tokens, but as refresh
tokens
Authorize
never
theexpire,
selected
user
APIs
should
and go
scopes
to their Google Account Authorized
Access page if they would like to manually revoke them.

Step 3 Configure request to API


Construct your HTTP request by specifying the URI, HTTP Method,
Request
Body
headers, content type and
request body.
Then click the "Send the request" button to initiate the HTTP Request.
Manual entry
GET Enter the data that will be added to the body of the request:

HTTP Method:

Headers

GET
POST
PUT
DELETE
PATCHAdd headers 0

Add a headers:

Header name Header value

Request URI:
application/json

Enter request body 0

Content-Type:

application/json
application/atom+xml
text/plain
text/csv
Custom...

File
Note: The OAuth accessYou
token
Step 2 to
will
beAvailable
added
topart
the Authorization
mayinchoose
send
a file as
of the request. When both a file and manual content are provided both will be sent using a multipart request. You may send
header of the request. files of maximum 1 MB using the Playground.

operations

Please select your file:


Fetching
available
operations...

No file selected.

Close

Something
bad

5/19/2015 9:56 PM

Você também pode gostar