服务端发送消息 > Python
杭州: rest-hangzhou.goeasy.io
新加坡: rest-singapore.goeasy.io
http(s)://<REST Host>/publish
Post
名称 | 必要 | 描述 |
---|---|---|
appkey | 是 | 您的appkey |
channel | 是 | channel |
content | 是 | 您要发送的消息内容 |
{
"code" : 200,
"content" : "OK"
}
返回值的详细说明,请参考附录A。
appkey = "BC-xxxxxxxxx"
channel = "my_channel"
content = "Hello, GoEasy!"
data = {"appkey" : appkey, "channel" : channel, "content" : content}
url = "http(s)://<REST Host>/publish"
response = requests.post(url, data = data)