2/oauth2/access token/en
(→Request Parameters) |
|||
(未显示1个用户的5个中间版本) | |||
第16行: | 第16行: | ||
!width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description | ||
{{api_args|client_id|true|string|AppKey created when an application is created.}} | {{api_args|client_id|true|string|AppKey created when an application is created.}} | ||
− | {{api_args|client_secret|true|string|AppSecret created when | + | {{api_args|client_secret|true|string|AppSecret created when an application is created.}} |
− | {{api_args|grant_type|true|string|Request type. | + | {{api_args|grant_type|true|string|Request type.Its value is 'authorization_code'.}} |
|} | |} | ||
第28行: | 第28行: | ||
!width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Type and Range | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Type and Range | ||
!width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description | ||
− | {{api_args|code|true|string|The | + | {{api_args|code|true|string|The value of code returned when call 'oauth2/authorize' interface.}} |
{{api_args|redirect_uri|true|string|Callback address.It need to be the same with the callback address filled when created the application.}} | {{api_args|redirect_uri|true|string|Callback address.It need to be the same with the callback address filled when created the application.}} | ||
|} | |} | ||
− | ;'''grant_type is password''' | + | <!--;'''grant_type is password''' |
{| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
|- | |- | ||
第53行: | 第53行: | ||
!width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description | ||
{{api_args|refresh_token|true|string|Returned refresh token.}} | {{api_args|refresh_token|true|string|Returned refresh token.}} | ||
− | |} | + | |}--> |
==Response== | ==Response== | ||
第60行: | 第60行: | ||
"access_token": "ACCESS_TOKEN", | "access_token": "ACCESS_TOKEN", | ||
"expires_in": 1234, | "expires_in": 1234, | ||
− | " | + | "remind_in":"798114", |
+ | "uid":"12341234" | ||
} | } | ||
</pre> | </pre> | ||
+ | <br/> | ||
+ | |||
+ | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
+ | |- | ||
+ | !width="25%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Returned Field | ||
+ | !width="15%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Type | ||
+ | !width="60%" style="text-align:left;padding-left:5px;font-weight:bolder;border:1px solid #cccccc"|Field Description | ||
+ | {{rdes_args|access_token|string|Authorized access token.}} | ||
+ | {{rdes_args|expires_in|string|Valid time of access token.Unit is the number of seconds.}} | ||
+ | {{rdes_args|remind_in|string|Valid time of access token.(This parameter will be invalid.Please use the parameter 'expires_in'.)}} | ||
+ | {{rdes_args|uid|string|The UID of the current authorized user.}} | ||
+ | |} | ||
__NOTOC__ | __NOTOC__ |
2013年4月1日 (一) 19:33的最后版本
oauth2/access_token
Access_token interface of OAuth2.
URL
https://api.weibo.com/oauth2/access_token
HTTP Request Method
POST
Request Parameters
Requires | Type and Range | Description | |
---|---|---|---|
client_id | true | string | AppKey created when an application is created. |
client_secret | true | string | AppSecret created when an application is created. |
grant_type | true | string | Request type.Its value is 'authorization_code'. |
- grant_type is authorization_code
Requires | Type and Range | Description | |
---|---|---|---|
code | true | string | The value of code returned when call 'oauth2/authorize' interface. |
redirect_uri | true | string | Callback address.It need to be the same with the callback address filled when created the application. |
Response
{ "access_token": "ACCESS_TOKEN", "expires_in": 1234, "remind_in":"798114", "uid":"12341234" }
Returned Field | Field Type | Field Description |
---|---|---|
access_token | string | Authorized access token. |
expires_in | string | Valid time of access token.Unit is the number of seconds. |
remind_in | string | Valid time of access token.(This parameter will be invalid.Please use the parameter 'expires_in'.) |
uid | string | The UID of the current authorized user. |
文档更新时间: 2013-04-01