General
References in Whats UY are the way we associate a WhatsApp account with our service, allowing you to interact with the API.
Create a New Reference
References allow you to associate a WhatsApp account by scanning a QR code. These references enable message sending and setting up message redirection to a webhook of your choice. Additionally, you can assign a bot to handle interactions with your customers.
To request a new reference, visit your profile and click on "Request New Reference".
If you prefer to create the reference through the API, you can do so using the following endpoint:
curl --location --request POST 'https://apirest.whatsuy.com/references/add' \
--header 'Authorization: Bearer <your-token>' \
--header 'Content-Type: application/json'
Example response:
{
"success": true,
"message": "",
"data": {
"reference": {
"reference": 11111111,
"state": "AWAITING-LOGIN",
"active": false,
"lastChange": "2022-08-26T20:23:36.693Z",
"lastValidPaiment": null,
"lastAccountSyncTimestamp": null,
"createdAt": "2022-08-26T20:23:36.693Z",
}
}
}
Associate WhatsApp Session
To associate your WhatsApp account, you need to generate a QR code. To do so, go to the reference and click on "Click to generate QR". Then, open your WhatsApp application and follow these steps:
- Open the Menu.
- Go to "Linked Devices".
- Click on "LINK A DEVICE".
- Scan the QR code.
You can also get the QR code through the API as follows:
curl --location --request POST 'https://apirest.whatsuy.com/sessions/add' \
--header 'Authorization: Bearer <your-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "11111111"
}'
You will receive a response that includes the data.update.qr
value, which you should display as a QR image.
Reference Status
You can check the status of your reference with the following command:
curl --location --request GET 'https://apirest.whatsuy.com/references/find/11111111' \
--header 'Authorization: Bearer <your-token>' \
--header 'Content-Type: application/json'
Sandbox
Sandbox type references allow you to perform the necessary tests to integrate your processes or system with Whats UY. They work in the same way as normal references, but have the following differences:
- They do not require payments to operate and cannot receive payments.
- They have a limit of up to 250 outgoing messages and 500 incoming messages per day.
- You can only send text messages and these will have a prefix indicating that they are sent through a sandbox.
Payments
Payments extend the duration of the reference's use, adding a month to it. If you have any problems with payments, please generate a query in the system's support section. If you have any questions or need additional help, our support team will be happy to assist you.