Send WeChat messages regularly through the GEWE framework

Links: geweapi.com

Send messages to your own WeChat regularly every day or every month
Implementation method: use GEWE framework
1. Application interface,
2. Code testing

create new device

A brief description:

  • When you log in to WeChat for the first time, you need to call this interface to create a device. After you log in again, you can directly use the previously created device ID to call the login QR code interface to log in.
  • The same account avoids frequently creating new device logins, which can easily trigger risk control

Request URL:

  • http://domain name address/api/login/createapp

    Request method:

  • POST

    Request header:

  • Content-Type:application/json

  • X-GEWE-TOKEN: background acquisition

    parameter:

parameter name required type of data illustrate
regions yes string Wechat login region ID, please select the nearest region when logging in, currently supports the following regions:
110000 Beijing 120000 Tianjin 130000 Hebei Province 140000 Shanxi Province 310000 Shanghai 320000 Jiangsu Province 330000 Zhejiang Province 340000 Anhui Province 350000 Fujian Province 360000 Jiangxi Province 370000 Shandong Province 410000 Henan Province 420000 Hubei Province 430000 Hunan Province 440000 Guangdong Province 460000 Hainan Province 500000 Chongqing City 510000 Sichuan Province 530000 Yunnan Province 610000 Shaanxi Province

return data:

parameter name type of data illustrate
ret number 0: success
msg string Feedback
data object
appid string Appid is equivalent to a cloud device

Example request parameters:

   {
       "regionid": "320000"
   }

Example of successful return:

    {
        "ret": 0,
        "msg": "success",
        "data": {
            "appid": "wx_nScLwnZhfNmlQlL0npc71"
        }
    }

Example error return:

    {
        "ret": 400,
        "msg_err": "regionid不存在,请检查参数!"
    }

login module

Log in to the micro-control platform member/login

Get WeChat QR code user/login

Execute WeChat login getIPadLoginInfo

Get contact list (group, friend) getAllContact

Second login (you need to log in again to call this interface to exit the WeChat account) secondLogin

Log out of WeChat logout

message receiving module

Set message receiving address setHttpCallbackUrl

Cancel message reception cancelHttpCallbackUrl

message sending module

send text message sendText

send image message sendImage

send video message sendVideo

send voice message sendVoice

Send link message sendUrl

Send name card message sendNameCard

send applet sendApp

friend module

Find user searchUser

add friend addUser

Delete friend delContact

Detect zombie fans checkZombie

Modify a friend's comment modifyRemark

Set personal avatar sendHeadImage

Agree to add friends acceptUser

Get the friend's information getContact

Get your own WeChat ID self

Get your own QR code getQrCode

group operation

Group chat @ sendText

Modify group name modifyGroupRemark

Exit group chat delGroupContact

Create WeChat group createChatroom

Add group members addChatRoomMember

Invite group members inviteChatRoomMember

Get group members getChatRoomMember

Set group announcement setChatRoomAnnouncement

Delete group members deleteChatRoomMember

Get group QR code getGroupQrCode

Save the group to the address book showInAddressBook

Automatically agree to join the group invite decodeUrl

Search WeChat group/friend information getContactFromServer

Initialize the enterprise WeChat contact initOpenIMContact

Get all enterprise WeChat contacts getAllOpenIMContact

Add enterprise WeChat group createOpenIMChatroom

Circle of friends

Moments like snsPraise

Circle of friends comment snsComment

Get your circle of friends getCircle

Get friend circle getFriendCircle

Send text to circle of friends snsSend

Send pictures to Moments snsSendImage

Send Video Moments snsSendVideo

Get the details of a circle of friends getSnsObject

Forward Moments (invisible to whom) snsSendXmlInvisibleToWhom

Delete a comment snsCommentDel of Moments content

Label

Add label addContactLabel

Modify the label modifyContactLabel

Delete user label delContactLabel

Get the label list getContactLabelList

Get the friend list of a label getLabelContacts

Favorites

Get favorite list weChatFavorites/favSync

Get favorite content weChatFavorites/getFavItem

Delete Favorites weChatFavorites/delFavItem

account management

Batch offline WeChat account member/offline

Query the logged-in WeChat ID member/getLoginWcIds under the account

Exit the micro-control platform member/logout

Guess you like

Origin blog.csdn.net/weixin_36648445/article/details/131918371