Wechaty Puppet Service OpenAPI Specification (1.5.2)
Download OpenAPI specification:Download
Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.
Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.
Puppet_ContactCorporationRemark
path Parameters
| contactId required | string |
Request Body schema: application/json
| corporationRemarkStringValueDeprecated | string |
| corporationRemark | string |
Responses
Request samples
- Payload
{- "corporationRemarkStringValueDeprecated": "string",
- "corporationRemark": "string"
}Response samples
- 200
- default
{ }Puppet_ContactDescription
path Parameters
| contactId required | string |
Request Body schema: application/json
| descriptionStringValueDeprecated | string |
| description | string |
Responses
Request samples
- Payload
{- "descriptionStringValueDeprecated": "string",
- "description": "string"
}Response samples
- 200
- default
{ }Puppet_TagContactList
path Parameters
| contactId required | string |
query Parameters
| contactIdStringValueDeprecated | string @deprecated: Huan(202109): Wrapper types must not be used going forward. https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields |
Responses
Response samples
- 200
- default
{- "ids": [
- "string"
]
}Puppet_ContactAlias
path Parameters
| id required | string |
Request Body schema: application/json
| aliasStringValueDeprecated | string (nullable) |
| alias | string |
Responses
Request samples
- Payload
{- "aliasStringValueDeprecated": "string",
- "alias": "string"
}Response samples
- 200
- default
{- "aliasStringValueDeprecated": "string",
- "alias": "string"
}Puppet_DirtyPayload2
path Parameters
| id required | string |
| type required | stringPAYLOAD_TYPE_CONTACT Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
{ }Puppet_MessageSendContact
path Parameters
| conversationId required | string |
Request Body schema: application/json
| contactId | string |
Responses
Request samples
- Payload
{- "contactId": "string"
}Response samples
- 200
- default
{- "idStringValueDeprecated": "string",
- "id": "string"
}Puppet_MessageSendLocation
path Parameters
| conversationId required | string |
Request Body schema: application/json
object (puppetLocationPayload) | |||||||||||
| |||||||||||
Responses
Request samples
- Payload
{- "location": {
- "accuracy": 0.1,
- "address": "string",
- "latitude": 0.1,
- "longitude": 0.1,
- "name": "string"
}
}Response samples
- 200
- default
{- "id": "string"
}Puppet_MessageSendMiniProgram
path Parameters
| conversationId required | string |
Request Body schema: application/json
| miniProgramDeprecated | string (*
Huan(202110): We should use payload instead of JSON.stringify string
The compatible code will be removed after Dec 31, 2022) |
object (puppetMiniProgramPayload) |
Responses
Request samples
- Payload
{- "miniProgramDeprecated": "string",
- "miniProgram": {
- "appid": "string",
- "description": "string",
- "pagePath": "string",
- "iconUrl": "string",
- "shareId": "string",
- "thumbUrl": "string",
- "title": "string",
- "username": "string",
- "thumbKey": "string"
}
}Response samples
- 200
- default
{- "idStringValueDeprecated": "string",
- "id": "string"
}Puppet_MessageSendText
path Parameters
| conversationId required | string |
Request Body schema: application/json
| text | string |
| mentionalIds | Array of strings (Huan(202011) FIXME: Issue #99
https://github.com/wechaty/grpc/issues/99) |
Responses
Request samples
- Payload
{- "text": "string",
- "mentionalIds": [
- "string"
]
}Response samples
- 200
- default
{- "idStringValueDeprecated": "string",
- "id": "string"
}Puppet_MessageSendUrl
path Parameters
| conversationId required | string |
Request Body schema: application/json
| urlLinkDeprecated | string (*
Huan(202110): We should use payload instead of JSON.stringify string
The compatible code will be removed after Dec 31, 2022) |
object (puppetUrlLinkPayload) |
Responses
Request samples
- Payload
{- "urlLinkDeprecated": "string",
- "urlLink": {
- "description": "string",
- "thumbnailUrl": "string",
- "title": "string",
- "url": "string"
}
}Response samples
- 200
- default
{- "idStringValueDeprecated": "string",
- "id": "string"
}Puppet_FriendshipAdd
path Parameters
| contactId required | string |
Request Body schema: application/json
| hello | string |
| sourceRoomIdStringValueDeprecated | string |
| sourceContactIdStringValueDeprecated | string |
object (*
"Referrer" and "Referral" refers to different things. "Referrer" is something or somebody who refers. "Referral" is the act of referring.
- https://english.stackexchange.com/questions/33135/referrer-versus-referral-versus-referer) |
Responses
Request samples
- Payload
{- "hello": "string",
- "sourceRoomIdStringValueDeprecated": "string",
- "sourceContactIdStringValueDeprecated": "string",
- "referrer": {
- "contactId": "string",
- "roomId": "string"
}
}Response samples
- 200
- default
{ }Puppet_FriendshipSearchHandle
path Parameters
| weixin required | string
(Huan(20220329): use TODO: rename |
Responses
Response samples
- 200
- default
{- "contactIdStringValueDeprecated": "string",
- "contactId": "string"
}*
Friendship
path Parameters
| id required | string |
query Parameters
| payloadStringValueDeprecated | string
|
| payload | string |
Responses
Response samples
- 200
- default
{- "id": "string",
- "contactId": "string",
- "hello": "string",
- "type": "FRIENDSHIP_TYPE_UNSPECIFIED",
- "stranger": "string",
- "ticket": "string",
- "scene": "FRIENDSHIP_SCENE_TYPE_UNSPECIFIED"
}Puppet_DirtyPayload5
path Parameters
| id required | string |
| type required | stringPAYLOAD_TYPE_FRIENDSHIP Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
{ }Response samples
- 200
- default
{- "id": "string",
- "filename": "string",
- "text": "string",
- "timestampDeprecated": "string",
- "type": "MESSAGE_TYPE_UNSPECIFIED",
- "talkerId": "string",
- "roomId": "string",
- "listenerId": "string",
- "mentionIds": [
- "string"
], - "receiveTime": "2019-08-24T14:15:22Z"
}Puppet_DirtyPayload
path Parameters
| id required | string |
| type required | stringPAYLOAD_TYPE_MESSAGE Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
{ }Response samples
- 200
- default
{- "miniProgramDeprecated": "string",
- "miniProgram": {
- "appid": "string",
- "description": "string",
- "pagePath": "string",
- "iconUrl": "string",
- "shareId": "string",
- "thumbUrl": "string",
- "title": "string",
- "username": "string",
- "thumbKey": "string"
}
}*
Room Invitation
path Parameters
| id required | string |
query Parameters
| payloadStringValueDeprecated | string
@deprecated: use payload instead. Huan(202109): Wrapper types must not be used going forward. https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields |
| payload | string |
Responses
Response samples
- 200
- default
{- "id": "string",
- "inviterId": "string",
- "topic": "string",
- "memberCount": 0,
- "memberIds": [
- "string"
], - "timestampUint64Deprecated": "string",
- "avatar": "string",
- "invitation": "string",
- "receiverId": "string",
- "receiveTime": "2019-08-24T14:15:22Z"
}Puppet_RoomAnnounce2
path Parameters
| id required | string |
Request Body schema: application/json
| textStringValueDeprecated | string |
| text | string |
Responses
Request samples
- Payload
{- "textStringValueDeprecated": "string",
- "text": "string"
}Response samples
- 200
- default
{- "textStringValueDeprecated": "string",
- "text": "string"
}Puppet_DirtyPayload4
path Parameters
| id required | string |
| type required | stringPAYLOAD_TYPE_ROOM_MEMBER Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
{ }Puppet_DirtyPayload3
path Parameters
| id required | string |
| type required | stringPAYLOAD_TYPE_ROOM Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
{ }* Huan(202203): https://github.com/wechaty/puppet/issues/181 @deprecated use FriendshipSearchHandle instead, will be removed in v3.0
Request Body schema: application/json
| weixin | string
(Huan(20220329): use TODO: rename |
Responses
Request samples
- Payload
{- "weixin": "string"
}Response samples
- 200
- default
{- "contactIdStringValueDeprecated": "string",
- "contactId": "string"
}* Deprecated: will be removed after Dec 31, 2022
Request Body schema: application/json
| id | string |
Responses
Request samples
- Payload
{- "id": "string"
}Response samples
- 200
- default
{- "result": {
- "fileBoxChunk": {
- "data": "string",
- "name": "string"
}
}, - "error": {
- "code": 0,
- "message": "string",
- "details": [
- {
- "@type": "string",
- "property1": null,
- "property2": null
}
]
}
}Puppet_MessageImage
Request Body schema: application/json
| id | string |
| type | string (puppetImageType) Default: "IMAGE_TYPE_UNSPECIFIED" Enum: "IMAGE_TYPE_UNSPECIFIED" "IMAGE_TYPE_THUMBNAIL" "IMAGE_TYPE_HD" "IMAGE_TYPE_ARTWORK" |
Responses
Request samples
- Payload
{- "id": "string",
- "type": "IMAGE_TYPE_UNSPECIFIED"
}Response samples
- 200
- default
{- "fileBox": "string"
}Puppet_MessageImageStream
Request Body schema: application/json
| id | string |
| type | string (puppetImageType) Default: "IMAGE_TYPE_UNSPECIFIED" Enum: "IMAGE_TYPE_UNSPECIFIED" "IMAGE_TYPE_THUMBNAIL" "IMAGE_TYPE_HD" "IMAGE_TYPE_ARTWORK" |
Responses
Request samples
- Payload
{- "id": "string",
- "type": "IMAGE_TYPE_UNSPECIFIED"
}Response samples
- 200
- default
{- "result": {
- "fileBoxChunk": {
- "data": "string",
- "name": "string"
}
}, - "error": {
- "code": 0,
- "message": "string",
- "details": [
- {
- "@type": "string",
- "property1": null,
- "property2": null
}
]
}
}Puppet_MessageSendFile
Request Body schema: application/json
| conversationId | string |
| fileBox | string |
Responses
Request samples
- Payload
{- "conversationId": "string",
- "fileBox": "string"
}Response samples
- 200
- default
{- "idStringValueDeprecated": "string",
- "id": "string"
}Puppet_MessageSendFileStream
Request Body schema: application/json
(streaming inputs)
| conversationId | string (oneof payload {) |
object (puppetFileBoxChunk) |
Responses
Request samples
- Payload
{- "conversationId": "string",
- "fileBoxChunk": {
- "data": "string",
- "name": "string"
}
}Response samples
- 200
- default
{- "idStringValueDeprecated": "string",
- "id": "string"
}Response samples
- 200
- default
{- "id": "string",
- "gender": "CONTACT_GENDER_UNSPECIFIED",
- "type": "CONTACT_TYPE_UNSPECIFIED",
- "name": "string",
- "avatar": "string",
- "address": "string",
- "alias": "string",
- "city": "string",
- "friend": true,
- "province": "string",
- "signature": "string",
- "star": true,
- "weixin": "string",
- "corporation": "string",
- "title": "string",
- "description": "string",
- "coworker": true,
- "phones": [
- "string"
]
}