Hi! 🥰 You would need to register with ChatDaddy first and scan your Whatsapp QR code so that we could link to your whatsapp, you may see the document below: https://www.notion.so/chatdaddy/ChatDaddy-3mins-db45d699f21c4c44b8165a890c6df21e
Hi🥰, below is how to generate the token https://chatdaddy.stoplight.io/docs/openapi/b3A6MTUxMDc5NDM-login-to-chat-daddy Github地址: https://github.com/chatdaddy/typescript-client
We have two tokens-
access token:
short lived(1 hour at most) tokens used to access APIs
curl
refresh token:
long lived tokens used to generate access tokens
curl
curl --request POST \\
--url <https://api-teams.chatdaddy.tech/token> \\
--header 'Content-Type: application/json' \\
--data '{"refreshToken":"d0d9d724-ec3f-4684-bdf5-65ae4f70df16","teamId":"1636bc4a-2122-4b06-8df7-d0d1e90bccf2","scopes":["MESSAGES_SEND_TO_ALL"]}'
PHP
<?php
$client = new http\\Client;
$request = new http\\Client\\Request;
$body = new http\\Message\\Body;
$body->append('{"refreshToken":"d0d9d724-ec3f-4684-bdf5-65ae4f70df16","teamId":"1636bc4a-2122-4b06-8df7-d0d1e90bccf2","scopes":["MESSAGES_SEND_TO_ALL"]}');
$request->setRequestUrl('<https://api-teams.chatdaddy.tech/token>');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
Hi 🥰 This is how you encode password :
https://www.notion.so/chatdaddy/How-to-encode-password-SHA256-base64-2cfba3f84cf845aaa052906752297992
Our javascript/typescript client library: https://github.com/chatdaddy/service-im-client
Example: https://github.com/chatdaddy/service-im-client/blob/main/examples/send-message.ts
Our REST API docs: https://chatdaddy.stoplight.io/docs/openapi/b3A6MzAzMDc5MDg-send-a-message