OAuth2/get oauth2 token
(→请求参数) |
(→请求参数) |
||
第27行: | 第27行: | ||
oauth_signature:签名值,是由根据上面的几个参数生成的 Base String经HMAC-SHA1算法计算得出。 | oauth_signature:签名值,是由根据上面的几个参数生成的 Base String经HMAC-SHA1算法计算得出。 | ||
− | 详细的OAuth1. | + | |
+ | 详细的OAuth1.0调用方式和SDK资源参见:http://open.weibo.com/wiki/Oauth | ||
==返回数据== | ==返回数据== |
2012年4月26日 (四) 11:33的版本
oauth2/get_oauth2_token
用于OAuth1.0 access token 更换至 OAuth2.0 access token,帮助开发者使用新版接口和OAuth2.0时平滑迁移用户。
URL
https://api.weibo.com/oauth2/get_oauth2_token
HTTP请求方式
GET/POST
请求参数
注意:该接口使用OAuth1.0的方式调用,换取OAuth2.0 access token后就可以用OAuth2.0的方式调用新版接口。
oauth_consumer_key: 创建应用时生成的APP KEY。
oauth_token:oauth的token。
oauth_signature_method: 签名方法,建议使用“HMAC-SHA1”。
oauth_timestamp:时间戳。生成Base String时的时间戳。
oauth_nonce:单次值,一个随机字符串,防止重复攻击。该参数只支持ASCII码的字符串。
oauth_version : OAuth协议版本。填写“1.0”。
oauth_signature:签名值,是由根据上面的几个参数生成的 Base String经HMAC-SHA1算法计算得出。
详细的OAuth1.0调用方式和SDK资源参见:http://open.weibo.com/wiki/Oauth
返回数据
{ "access_token": "ACCESS_TOKEN", "expires_in": 1234 }
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
access_token | string | 用于调用新版接口的OAuth2.0 access_token。 |
remind_in | string | access_token的剩余时间。 |