赞
踩
最近很多人找我要这个东西,为避免被频繁打扰,我把我逆向后的接口放出来,本技术仅供学习参考,如有不支持其他商业用途。
### 获取登录二维码 参数: t 必填,是标识这次登录的唯一id。登录后,相同的 id 只要会话没过期,就不需要继续登录 curl -X POST "http://3.12.161.134:29336/googlemessage/v1/login?t=222" -H "Authorization: Bearer FnRsiSxvJL0AR1vN95fCjEhiNGCahhEWBwDNmlglDqLZk4NSkLBXEfB83TIGLbpg" -i HTTP/1.1 200 OK Content-Length: 257 Connection: keep-alive Content-Type: application/json Date: Thu, 16 Nov 2023 16:10:40 GMT Keep-Alive: timeout=4 Proxy-Connection: keep-alive {"status":"qr","code":"https://support.google.com/messages/?p=web_computer#?c=Cj0A+qBS8wMm/qDEPKVj+68vVx3p6WSTuP0HoGyXiPrXA35sFnXLrIpV/QF2w2t7S8xnGoXjPIxReiW1RYNrEiAMfJaL6WUwKWHp5XDttU993jVao4RRlhO9tcFuX9lL7RogBeHjT8Uc1hDTEJEzU4sFoJ6yD8arY1wfcPbsAeerF/c="} code 是要扫码的链接,将这个链接转为二维码显示,再给 app 扫码。 ### 退出登录 参数: user_id 必填,就是二维码登录接口的 t 参数,一一对应 curl -X POST "http://3.12.161.134:29336/googlemessage/v1/logout?user_id=1697947786" -H "Authorization: Bearer FnRsiSxvJL0AR1vN95fCjEhiNGCahhEWBwDNmlglDqLZk4NSkLBXEfB83TIGLbpg" -i HTTP/1.1 200 OK Content-Length: 75 Connection: keep-alive Content-Type: application/json Date: Thu, 16 Nov 2023 16:17:28 GMT Keep-Alive: timeout=4 Proxy-Connection: keep-alive {"success":false,"error":"You're not logged in","errcode":"not logged in"} success 是 true 的时候,就是退出成功 ### 判断一个号是否登录 参数: user_id 必填,就是二维码登录接口的 t 参数,一一对应 curl -X GET "http://3.12.161.134:29336/googlemessage/v1/is_login?user_id=111222" -H "Authorization: Bearer FnRsiSxvJL0AR1vN95fCjEhiNGCahhEWBwDNmlglDqLZk4NSkLBXEfB83TIGLbpg" -i HTTP/1.1 400 Bad Request Content-Length: 43 Connection: keep-alive Content-Type: application/json Date: Thu, 16 Nov 2023 16:19:15 GMT Keep-Alive: timeout=4 Proxy-Connection: keep-alive {"status":"failed","errcode":"need login"} httpCode 是 200 或 status = success,就是已经登录 ### 给号码发消息 参数: 链接处拼接:user_id 必填,就是二维码登录接口的 t 参数,一一对应 POST-的部分: { "message_type": "m.text", "is_rcs": true, "to_phone": "+971566874182", "content": "test", "url": "", "mime_type": "" } 解析: message_type 要发送的消息类型,取值如下: m.text // 文字 m.emote m.notice m.image // 图片 m.location m.video // 视频 m.audio // 语音 m.file is_rcs true 是发送 rcs 消息,false 是短信 to_phone 收消息的手机号,带+号 content 发送的内容,只有在 m.text 文本消息的时候有效 url 只有在 message_type 不是 m.text 时候有效,多媒体消息的超链接,比如 http://xx.com/1.jpg mime_type 多媒体类型,取值如下: image/jpeg image/jpg image/png image/gif image/bmp video/mp4 video/webm audio/amr audio/mp3 audio/mpeg audio/mpg audio/mp4 audio/ogg curl -X POST "http://3.12.161.134:29336/googlemessage/v1/send_message?user_id=111" -H "Authorization: Bearer FnRsiSxvJL0AR1vN95fCjEhiNGCahhEWBwDNmlglDqLZk4NSkLBXEfB83TIGLbpg" -d '{"message_type":"m.text","is_rcstrue,"to_phone":"+971566874182","content":"test","url":"","mime_type":""}' -i HTTP/1.1 200 OK Content-Length: 13 Connection: keep-alive Content-Type: application/json Date: Thu, 16 Nov 2023 16:29:34 GMT Keep-Alive: timeout=4 Proxy-Connection: keep-alive {"status":1,"conversation_id": "4"} status 为 1,成功。conversation_id 会话 id ### 获取消息发送情况 这个接口允许你们根据这些数据来做对抗风控的延迟。 参数: 链接处拼接:user_id 必填,就是二维码登录接口的 t 参数,一一对应 reset 如果不为空字符串,就是重置服务端记录。 curl -X GET "http://3.12.161.134:29336/googlemessage/v1/stop_flag?user_id=222&reset=" -H "Authorization: Bearer FnRsiSxvJL0AR1vN95fCjEhiNGCahhEWBwDNmlglDqLZk4NSkLBXEfB83TIGLbpg" -i HTTP/1.1 200 OK Content-Length: 257 Connection: keep-alive Content-Type: application/json Date: Thu, 16 Nov 2023 16:10:40 GMT Keep-Alive: timeout=4 Proxy-Connection: keep-alive {"complete_sec":0,"delivered_sec":0,"complete_count":0,"delivered_count":0} complete_sec 消息成功发出的最后时间,时间戳秒 delivered_sec 消息成功送达的最后时间,时间戳秒 complete_count 消息成功发出数,对应手机页面 1 个打勾 delivered_count 消息成功送达,对应手机页面 2 个打勾
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。