C/2/messages/reply/biz-en

跳转到: 导航, 搜索
(messages/reply/biz)
 
(未显示1个用户的4个中间版本)
第6行: 第6行:
 
For user mentioning event, developers can reply only one time 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 [mailto:mingjin@staff.sina.com.cn mingjin@staff.sina.com.cn] to apply.
+
Note: This API could return 'mentioned(@) messages' if designated verified users get authorized receiving 'mentioned(@) messages'. Please email [mailto:jingyi7@staff.weibo.com jingyi7@staff.weibo.com]to apply.
  
 
Developer could not reply to messages if user unfollowed.
 
Developer could not reply to messages if user unfollowed.
第25行: 第25行:
 
|-
 
|-
 
!width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"| 
 
!width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"| 
!width="5%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选
+
!width="5%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Requires
!width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围
+
!width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Type and Range
!width="75%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明
+
!width="75%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|Description
{{api_args|access_token|true|string|Obtained from Fan Service Platform - Advanced - Developer mode page, or after authorized by OAuth2.0, see [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]] for details.}}
+
{{api_args|access_token|true|string|Obtained from Fan Service Platform - Advanced - Developer mode page, or after authorized by OAuth2.0, see [[Messages_api/access_token|Obtain developer API access token on Fan Service Platform]] for details.}}
 
{{api_args|type|true|string|Response message type: text: pure text, articles: image&text, position: location.}}
 
{{api_args|type|true|string|Response message type: text: pure text, articles: image&text, position: location.}}
 
{{api_args|data|true|string|Message data, the content should exactly correspond to 'type' parameter, must be json string format after URL encoded, using UTF-8.}}
 
{{api_args|data|true|string|Message data, the content should exactly correspond to 'type' parameter, must be json string format after URL encoded, using UTF-8.}}
第39行: 第39行:
 
==Notes==
 
==Notes==
 
*1. Sender's uid is decided by parameter access_token.
 
*1. Sender's uid is decided by parameter access_token.
*2. 调用接口时,需要消息发送方有针对于消息接收方的消息配额;一般来说,如果消息接收方给消息发送方主动发送过消息,则在48小时内,消息发送方具备针对于消息接收方的主动配额99条;
+
*2. When using this API, the sender should have quota of sending messages to receiver: generally speaking, sender get 99 quota within 48 hours for sending messages to the receiver after receiver sent messages to sender. 
When
+
*3. For developers using long connection access mode, the message/reply interface is slightly different, please go to http://open.weibo.com/wiki/2/messages/reply for details.
*3. 对于使用长连接接入模式的开发者,message/reply接口的调用方式略有不同,详情请参考http://open.weibo.com/wiki/2/messages/reply 文档;
+
  
 
+
This API mustn't be used to promoting or guiding the user to use any service that has a direct competitive relationship with sina Weibo, otherwise application or V users will be permanently blocked.
此接口不得用于推广或引导用户使用任何与新浪微博有直接竞争关系的公司的服务,否则将永久关停指定应用或V用户使用资格。
+
  
 
==Message Type Blue V user could Reply==
 
==Message Type Blue V user could Reply==
第60行: 第58行:
  
 
{|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;"|-
!width="20%" style="font-weight:bolder;border:1px solid #CCCCCC;"|参数名称
+
!width="20%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Parameters
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|值的类型
+
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Type
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填
+
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Requires
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述
+
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Description
 
{{api_args|text|string|true|Text content of replied message. The length of the content must be less than 300 Chinese characters.}}
 
{{api_args|text|string|true|Text content of replied message. The length of the content must be less than 300 Chinese characters.}}
 
|}
 
|}
第95行: 第93行:
  
 
{|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;"|-
!width="20%" style="font-weight:bolder;border:1px solid #CCCCCC;"|参数名称
+
!width="20%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Parameters
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|值的类型
+
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Type
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填
+
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Requires
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述
+
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Description
 
{{api_args|articles:display_name|string|true|Displayed title of img&text.}}
 
{{api_args|articles:display_name|string|true|Displayed title of img&text.}}
 
{{api_args|articles:summary|string|true|Description of img&text, only first description is displayed if more than 2 img&text.}}
 
{{api_args|articles:summary|string|true|Description of img&text, only first description is displayed if more than 2 img&text.}}
第116行: 第114行:
  
 
{|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;"|-
!width="20%" style="font-weight:bolder;border:1px solid #CCCCCC;"|参数名称
+
!width="20%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Parameters
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|值的类型
+
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Type
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|是否必填
+
!width="10%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Requires
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|说明描述
+
!width="60%" style="font-weight:bolder;border:1px solid #CCCCCC;"|Description
 
{{api_args|longitude|string|true|Longitude}}
 
{{api_args|longitude|string|true|Longitude}}
 
{{api_args|latitude|string|true|Latitude}}
 
{{api_args|latitude|string|true|Latitude}}

2015年10月28日 (三) 15:37的最后版本

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 jingyi7@staff.weibo.comto 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

  Requires Type and Range Description
access_token true string Obtained from Fan Service Platform - Advanced - Developer mode page, or after authorized by OAuth2.0, see Obtain developer API access token on Fan Service Platform 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. When using this API, the sender should have quota of sending messages to receiver: generally speaking, sender get 99 quota within 48 hours for sending messages to the receiver after receiver sent messages to sender.
  • 3. For developers using long connection access mode, the message/reply interface is slightly different, please go to http://open.weibo.com/wiki/2/messages/reply for details.

This API mustn't be used to promoting or guiding the user to use any service that has a direct competitive relationship with sina Weibo, otherwise application or V users will be permanently blocked.

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": "纯文本回复"
}


Parameters Type Requires Description
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.
    ]
}


Parameters Type Requires Description
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"
}
Parameters Type Requires Description
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"
}


文档更新时间: 2015-10-28