xxxxxxxxxxxxxxxxxxxxxxxxxxxx

时间:2025-04-01 10:09:21

Get Authorization code:
Request:
/o/oauth2/v2/auth
?redirect_uri=https%3A%2F%%2Foauthplayground
&prompt=consent
&response_type=code
&client_id=
&scope=https%3A%2F%
&access_type=offline

Response:
GET /oauthplayground/
?code=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
&scope= HTTP/1.1
Host:


Get Accesstoken:
Request:
POST /oauth2/v4/token HTTP/1.1
Host:
Content-length: 277
content-type: application/x-www-form-urlencoded
user-agent: google-oauth-playground
code=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
&redirect_uri=https%3A%2F%%2Foauthplayground
&client_id=
&client_secret=************
&scope=
&grant_type=authorization_code

Response:
HTTP/1.1 200 OK
Content-length: 583
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Fri, 15 Mar 2019 06:36:45 GMT
X-frame-options: SAMEORIGIN
Alt-svc: quic=":443"; ma=2592000; v="46,44,43,39"
Content-type: application/json; charset=utf-8
{
  "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "scope": "/auth/gmail",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}