C/2/messages/reply/biz-en
第48行: | 第48行: | ||
==Message Type Blue V user could Reply== | ==Message Type Blue V user could Reply== | ||
− | + | Currently, the following data value could be supported for message types blue V could reply: | |
− | + | <h3>1. Pure text message: text</h3> | |
− | <h3> | + | |
<pre> | <pre> | ||
{ | { | ||
第65行: | 第64行: | ||
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填 | !width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填 | ||
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述 | !width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述 | ||
− | {{api_args|text|string|true| | + | {{api_args|text|string|true|Text content of replied message. The length of the content must be less than 300 Chinese characters.}} |
|} | |} | ||
− | * | + | *Example: |
− | ** | + | **URL encoded json type data {"text": "纯文本响应"}(pure text response) is '%7B%22text%22%3A%22%E7%BA%AF%E6%96%87%E6%9C%AC%E5%9B%9E%E5%A4%8D%22%7D'. |
− | + | The corresponding call is: | |
<pre> | <pre> | ||
curl "https://m.api.weibo.com/2/messages/reply.json?access_token=ACCESS_TOKEN" -d 'receiver_id=RECEIVER_ID&type=text&data=%7B%22text%22%3A%22%E7%BA%AF%E6%96%87%E6%9C%AC%E5%9B%9E%E5%A4%8D%22%7D' -k | curl "https://m.api.weibo.com/2/messages/reply.json?access_token=ACCESS_TOKEN" -d 'receiver_id=RECEIVER_ID&type=text&data=%7B%22text%22%3A%22%E7%BA%AF%E6%96%87%E6%9C%AC%E5%9B%9E%E5%A4%8D%22%7D' -k | ||
第77行: | 第76行: | ||
− | <h3> | + | <h3>2. Img&text message: articles</h3> |
<pre> | <pre> | ||
{ | { | ||
第87行: | 第86行: | ||
"url": "http://e.weibo.com/mediaprofile/article/detail?uid=1722052204&aid=983319" | "url": "http://e.weibo.com/mediaprofile/article/detail?uid=1722052204&aid=983319" | ||
}, | }, | ||
− | ... // | + | ... //Support up to 8 articles, recommend 1 or 3. |
] | ] | ||
} | } | ||
第100行: | 第99行: | ||
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填 | !width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填 | ||
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述 | !width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述 | ||
− | {{api_args|articles:display_name|string|true| | + | {{api_args|articles:display_name|string|true|Displayed title of img&text.}} |
− | {{api_args|articles:summary|string|true| | + | {{api_args|articles:summary|string|true|Description of img&text, only first description is displayed if more than 2 img&text.}} |
− | {{api_args|articles:image|string|true| | + | {{api_args|articles:image|string|true|Thumbnail of img&text, support JPG and PNG, using 280*155 for first one of single or multiple img&text, using 64*64 for the rest.}} |
− | {{api_args|articles:url|string|true| | + | {{api_args|articles:url|string|true|URL address of img&text, redirect after click.}} |
|} | |} | ||
− | <h3> | + | <h3>3. Location type message: position </h3> |
<pre> | <pre> | ||
{ | { |
2015年7月23日 (四) 18:30的版本
messages/reply/biz
When users send messages to verified account, system will push messages to developer, then developer could call this API to receive messages with limited time. Currently, for user sending messages, following/subscribing events, clicking customized menu, scanning two-dimensional code, developers can send messages without limitation within 48 hours.
For user mentioning event, developers can reply only one time within 48 hours.
Note: This API could return 'mentioned(@) messages' if designated verified users get authorized receiving 'mentioned(@) messages'. Please email mingjin@staff.sina.com.cn to apply.
Developer could not reply to messages if user unfollowed.
URL
https://c.api.weibo.com/2/messages/reply/biz.json
HTTP Request Method
POST
Requires Login
true
See the Login and Authorization Mechanism Statement for login and authorization details.
Request Parameters
必选 | 类型及范围 | 说明 | |
---|---|---|---|
access_token | true | string | Obtained from Fan Service Platform - Advanced - Developer mode page, or after authorized by OAuth2.0, see 获取粉丝服务平台开发接口的access token for details. |
type | true | string | Response message type: text: pure text, articles: image&text, position: location. |
data | true | string | Message data, the content should exactly correspond to 'type' parameter, must be json string format after URL encoded, using UTF-8. |
receiver_id | true | int64 | ID of message receiver. |
save_sender_box | false | int | Valued 0 or 1, default as 1 if leave blank. If assigned as 1, messages send through this API will enter the sender's private mailbox; if assigned as 0, messages send through this API won't enter the sender's private mailbox. |
- Note:Content-Type: application/x-www-form-urlencoded
Notes
- 1. Sender's uid is decided by parameter access_token.
- 2. 调用接口时,需要消息发送方有针对于消息接收方的消息配额;一般来说,如果消息接收方给消息发送方主动发送过消息,则在48小时内,消息发送方具备针对于消息接收方的主动配额99条;
When
- 3. 对于使用长连接接入模式的开发者,message/reply接口的调用方式略有不同,详情请参考http://open.weibo.com/wiki/2/messages/reply 文档;
此接口不得用于推广或引导用户使用任何与新浪微博有直接竞争关系的公司的服务,否则将永久关停指定应用或V用户使用资格。
Message Type Blue V user could Reply
Currently, the following data value could be supported for message types blue V could reply:
1. Pure text message: text
{ "text": "纯文本回复" }
参数名称 | 值的类型 | 是否必填 | 说明描述 |
---|---|---|---|
text | string | true | Text content of replied message. The length of the content must be less than 300 Chinese characters. |
- Example:
- URL encoded json type data {"text": "纯文本响应"}(pure text response) is '%7B%22text%22%3A%22%E7%BA%AF%E6%96%87%E6%9C%AC%E5%9B%9E%E5%A4%8D%22%7D'.
The corresponding call is:
curl "https://m.api.weibo.com/2/messages/reply.json?access_token=ACCESS_TOKEN" -d 'receiver_id=RECEIVER_ID&type=text&data=%7B%22text%22%3A%22%E7%BA%AF%E6%96%87%E6%9C%AC%E5%9B%9E%E5%A4%8D%22%7D' -k
2. Img&text message: articles
{ "articles": [ { "display_name": "两个故事", "summary": "今天讲两个故事,分享给你。谁是公司?谁又是中国人??", "image": "http://storage.mcp.weibo.cn/0JlIv.jpg", "url": "http://e.weibo.com/mediaprofile/article/detail?uid=1722052204&aid=983319" }, ... //Support up to 8 articles, recommend 1 or 3. ] }
参数名称 | 值的类型 | 是否必填 | 说明描述 |
---|---|---|---|
articles:display_name | string | true | Displayed title of img&text. |
articles:summary | string | true | Description of img&text, only first description is displayed if more than 2 img&text. |
articles:image | string | true | Thumbnail of img&text, support JPG and PNG, using 280*155 for first one of single or multiple img&text, using 64*64 for the rest. |
articles:url | string | true | URL address of img&text, redirect after click. |
3. Location type message: position
{ "longitude": "344.3344", "latitude": "232.343434" }
参数名称 | 值的类型 | 是否必填 | 说明描述 |
---|---|---|---|
longitude | string | true | Longitude |
latitude | string | true | Latitude |
Response
// 成功返回 { "result": true, "sender_id": "123", "receiver_id": "456", "type":"position" "data": "%7B%22longitude%22%3A%22344.3344%22%2C%22latitude%22%3A%22232.343434%22%7D" }