Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Auth V2
Login User and return JWT Token
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"username\": \"whatsapp@aquadic.com\",
\"password\": \"JamesBond007\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"username": "whatsapp@aquadic.com",
"password": "JamesBond007"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/auth/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'username' => 'whatsapp@aquadic.com',
'password' => 'JamesBond007',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/auth/login'
payload = {
"username": "whatsapp@aquadic.com",
"password": "JamesBond007"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get User Details
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/auth/user" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v2/auth/user"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/auth/user';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/auth/user'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logging Out User.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/auth/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"from_all\": true
}"
const url = new URL(
"https://cloudwa.net/api/v2/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"from_all": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/auth/logout';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'from_all' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/auth/logout'
payload = {
"from_all": true
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Users/Devices
Get Devices.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/devices" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v2/devices"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/devices';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/devices'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add Or Update Devices
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/devices" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"device_type\": \"android\",
\"device_token\": \"AQ-DEVICE-2022\",
\"device_name\": \"AQ Best Device Ever\",
\"notifiable_method\": \"firebase\",
\"notifiable_token\": \"XXXXAAAAXXXXAAAAXXXX\",
\"enabled\": false
}"
const url = new URL(
"https://cloudwa.net/api/v2/devices"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"device_type": "android",
"device_token": "AQ-DEVICE-2022",
"device_name": "AQ Best Device Ever",
"notifiable_method": "firebase",
"notifiable_token": "XXXXAAAAXXXXAAAAXXXX",
"enabled": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/devices';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'device_type' => 'android',
'device_token' => 'AQ-DEVICE-2022',
'device_name' => 'AQ Best Device Ever',
'notifiable_method' => 'firebase',
'notifiable_token' => 'XXXXAAAAXXXXAAAAXXXX',
'enabled' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/devices'
payload = {
"device_type": "android",
"device_token": "AQ-DEVICE-2022",
"device_name": "AQ Best Device Ever",
"notifiable_method": "firebase",
"notifiable_token": "XXXXAAAAXXXXAAAAXXXX",
"enabled": false
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Device.
requires authentication
Example request:
curl --request DELETE \
"https://cloudwa.net/api/v2/devices/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v2/devices/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/devices/5';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/devices/5'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Campaigns V2
Get Campaigns of Session.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/campaigns" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v2/campaigns"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/campaigns';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/campaigns'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Campaign Details.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/campaigns/details" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"campaign_id\": 46
}"
const url = new URL(
"https://cloudwa.net/api/v2/campaigns/details"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"campaign_id": 46
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/campaigns/details';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'campaign_id' => 46,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/campaigns/details'
payload = {
"campaign_id": 46
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Campaign Messages.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/campaigns/messages" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"campaign_id\": 17
}"
const url = new URL(
"https://cloudwa.net/api/v2/campaigns/messages"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"campaign_id": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/campaigns/messages';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'campaign_id' => 17,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/campaigns/messages'
payload = {
"campaign_id": 17
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Campaign.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/campaigns/create" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"name\": \"Campaign-2022\",
\"description\": \"AQ-Campaign-2022\",
\"session_uuids\": [
\"udtygwmuazqycols\"
],
\"phones\": [
201101782890
],
\"type\": \"TEXT\",
\"starting_time\": \"2022-09-24T12:00:17\",
\"ending_time\": \"2024-10-04T16:48:33\",
\"typing_duration\": 11,
\"daily_limit\": 2,
\"message_interval\": \"earum\",
\"add_ref\": false,
\"session_uuid\": \"CLOUD-WA-SESSION-UUID-2022\",
\"message\": \"Hello Test From AQ-APPS\",
\"image\": \"https:\\/\\/static.facebook.com\\/images\\/whatsapp\\/www\\/whatsapp-promo.png\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/campaigns/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"name": "Campaign-2022",
"description": "AQ-Campaign-2022",
"session_uuids": [
"udtygwmuazqycols"
],
"phones": [
201101782890
],
"type": "TEXT",
"starting_time": "2022-09-24T12:00:17",
"ending_time": "2024-10-04T16:48:33",
"typing_duration": 11,
"daily_limit": 2,
"message_interval": "earum",
"add_ref": false,
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
"message": "Hello Test From AQ-APPS",
"image": "https:\/\/static.facebook.com\/images\/whatsapp\/www\/whatsapp-promo.png"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/campaigns/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'name' => 'Campaign-2022',
'description' => 'AQ-Campaign-2022',
'session_uuids' => [
'udtygwmuazqycols',
],
'phones' => [
201101782890,
],
'type' => 'TEXT',
'starting_time' => '2022-09-24T12:00:17',
'ending_time' => '2024-10-04T16:48:33',
'typing_duration' => 11,
'daily_limit' => 2,
'message_interval' => 'earum',
'add_ref' => false,
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
'message' => 'Hello Test From AQ-APPS',
'image' => 'https://static.facebook.com/images/whatsapp/www/whatsapp-promo.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/campaigns/create'
payload = {
"name": "Campaign-2022",
"description": "AQ-Campaign-2022",
"session_uuids": [
"udtygwmuazqycols"
],
"phones": [
201101782890
],
"type": "TEXT",
"starting_time": "2022-09-24T12:00:17",
"ending_time": "2024-10-04T16:48:33",
"typing_duration": 11,
"daily_limit": 2,
"message_interval": "earum",
"add_ref": false,
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
"message": "Hello Test From AQ-APPS",
"image": "https:\/\/static.facebook.com\/images\/whatsapp\/www\/whatsapp-promo.png"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Chats V2
Get Chat of Session.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions/chat?session_uuid=CLOUD-WA-SESSION-UUID-2022" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"cb17c915-a49b-39ca-a6c3-1d25da5df662\",
\"chat_id\": \"fhoreiicrct\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions/chat"
);
const params = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "cb17c915-a49b-39ca-a6c3-1d25da5df662",
"chat_id": "fhoreiicrct"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions/chat';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'query' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
],
'json' => [
'session_uuid' => 'cb17c915-a49b-39ca-a6c3-1d25da5df662',
'chat_id' => 'fhoreiicrct',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions/chat'
payload = {
"session_uuid": "cb17c915-a49b-39ca-a6c3-1d25da5df662",
"chat_id": "fhoreiicrct"
}
params = {
'session_uuid': 'CLOUD-WA-SESSION-UUID-2022',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Chats of Session.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions/chats?session_uuid=CLOUD-WA-SESSION-UUID-2022" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"c729c74a-85cb-325c-ae6d-891df0844841\",
\"type\": \"debitis\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions/chats"
);
const params = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "c729c74a-85cb-325c-ae6d-891df0844841",
"type": "debitis"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions/chats';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'query' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
],
'json' => [
'session_uuid' => 'c729c74a-85cb-325c-ae6d-891df0844841',
'type' => 'debitis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions/chats'
payload = {
"session_uuid": "c729c74a-85cb-325c-ae6d-891df0844841",
"type": "debitis"
}
params = {
'session_uuid': 'CLOUD-WA-SESSION-UUID-2022',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Labels of Session.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions/labels?session_uuid=CLOUD-WA-SESSION-UUID-2022" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"f80a5098-1a86-3530-bfaa-b5faa34c991e\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions/labels"
);
const params = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "f80a5098-1a86-3530-bfaa-b5faa34c991e"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions/labels';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'query' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
],
'json' => [
'session_uuid' => 'f80a5098-1a86-3530-bfaa-b5faa34c991e',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions/labels'
payload = {
"session_uuid": "f80a5098-1a86-3530-bfaa-b5faa34c991e"
}
params = {
'session_uuid': 'CLOUD-WA-SESSION-UUID-2022',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Contacts of Session.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions/contacts?session_uuid=CLOUD-WA-SESSION-UUID-2022" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"0291adb6-122b-3f3d-a6c1-cb86a2f0f92e\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions/contacts"
);
const params = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "0291adb6-122b-3f3d-a6c1-cb86a2f0f92e"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions/contacts';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'query' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
],
'json' => [
'session_uuid' => '0291adb6-122b-3f3d-a6c1-cb86a2f0f92e',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions/contacts'
payload = {
"session_uuid": "0291adb6-122b-3f3d-a6c1-cb86a2f0f92e"
}
params = {
'session_uuid': 'CLOUD-WA-SESSION-UUID-2022',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check if Phone Available to Chat.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions/check_availability?session_uuid=CLOUD-WA-SESSION-UUID-2022&chat_id=201101782890" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"3b794b5a-c592-3377-980e-0898066cb29b\",
\"chat_id\": \"qpcckzzamtkgjmlfdnciwojl\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions/check_availability"
);
const params = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
"chat_id": "201101782890",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "3b794b5a-c592-3377-980e-0898066cb29b",
"chat_id": "qpcckzzamtkgjmlfdnciwojl"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions/check_availability';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'query' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
'chat_id' => '201101782890',
],
'json' => [
'session_uuid' => '3b794b5a-c592-3377-980e-0898066cb29b',
'chat_id' => 'qpcckzzamtkgjmlfdnciwojl',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions/check_availability'
payload = {
"session_uuid": "3b794b5a-c592-3377-980e-0898066cb29b",
"chat_id": "qpcckzzamtkgjmlfdnciwojl"
}
params = {
'session_uuid': 'CLOUD-WA-SESSION-UUID-2022',
'chat_id': '201101782890',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Messages V2
Get Messages of Chat.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/messages" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"cc3289dd-7a8a-3869-9e07-991227bfdb80\",
\"chat_id\": \"yaenrzhrtoccanafad\",
\"include_notifications\": false
}"
const url = new URL(
"https://cloudwa.net/api/v2/messages"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "cc3289dd-7a8a-3869-9e07-991227bfdb80",
"chat_id": "yaenrzhrtoccanafad",
"include_notifications": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/messages';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'session_uuid' => 'cc3289dd-7a8a-3869-9e07-991227bfdb80',
'chat_id' => 'yaenrzhrtoccanafad',
'include_notifications' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/messages'
payload = {
"session_uuid": "cc3289dd-7a8a-3869-9e07-991227bfdb80",
"chat_id": "yaenrzhrtoccanafad",
"include_notifications": false
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send Message to Chat.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/messages/send-message" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"CLOUD-WA-SESSION-UUID-2022\",
\"chat_id\": \"201101782890\",
\"type\": \"TEXT\",
\"schedule_at\": \"2022-09-24T12:00:17\",
\"urgency\": \"2\",
\"reply_to_message_id\": \"rqs\",
\"message\": \"Hello Test From AQ-APPS\",
\"image\": \"https:\\/\\/static.facebook.com\\/images\\/whatsapp\\/www\\/whatsapp-promo.png\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/messages/send-message"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
"chat_id": "201101782890",
"type": "TEXT",
"schedule_at": "2022-09-24T12:00:17",
"urgency": "2",
"reply_to_message_id": "rqs",
"message": "Hello Test From AQ-APPS",
"image": "https:\/\/static.facebook.com\/images\/whatsapp\/www\/whatsapp-promo.png"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/messages/send-message';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
'chat_id' => '201101782890',
'type' => 'TEXT',
'schedule_at' => '2022-09-24T12:00:17',
'urgency' => '2',
'reply_to_message_id' => 'rqs',
'message' => 'Hello Test From AQ-APPS',
'image' => 'https://static.facebook.com/images/whatsapp/www/whatsapp-promo.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/messages/send-message'
payload = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
"chat_id": "201101782890",
"type": "TEXT",
"schedule_at": "2022-09-24T12:00:17",
"urgency": "2",
"reply_to_message_id": "rqs",
"message": "Hello Test From AQ-APPS",
"image": "https:\/\/static.facebook.com\/images\/whatsapp\/www\/whatsapp-promo.png"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Media of Message.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/messages/get-media" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"9fd1f4db-662f-37fd-80dd-bd64c399b770\",
\"chat_id\": \"rnmvgoeuwxqju\",
\"message_id\": \"rpiyzfnpclkcmonhxmhgdlpbrraxpnvwwobkjb\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/messages/get-media"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "9fd1f4db-662f-37fd-80dd-bd64c399b770",
"chat_id": "rnmvgoeuwxqju",
"message_id": "rpiyzfnpclkcmonhxmhgdlpbrraxpnvwwobkjb"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/messages/get-media';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'session_uuid' => '9fd1f4db-662f-37fd-80dd-bd64c399b770',
'chat_id' => 'rnmvgoeuwxqju',
'message_id' => 'rpiyzfnpclkcmonhxmhgdlpbrraxpnvwwobkjb',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/messages/get-media'
payload = {
"session_uuid": "9fd1f4db-662f-37fd-80dd-bd64c399b770",
"chat_id": "rnmvgoeuwxqju",
"message_id": "rpiyzfnpclkcmonhxmhgdlpbrraxpnvwwobkjb"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Forward Message.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/messages/forward-message" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"ba84ae43-4419-3514-9b72-c73c9a0bd129\",
\"chat_id\": \"hvutufaqvqrexpjmzpd\",
\"message_id\": \"xfdgenocanzhamdlshaewwytmtnyzybl\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/messages/forward-message"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "ba84ae43-4419-3514-9b72-c73c9a0bd129",
"chat_id": "hvutufaqvqrexpjmzpd",
"message_id": "xfdgenocanzhamdlshaewwytmtnyzybl"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/messages/forward-message';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'session_uuid' => 'ba84ae43-4419-3514-9b72-c73c9a0bd129',
'chat_id' => 'hvutufaqvqrexpjmzpd',
'message_id' => 'xfdgenocanzhamdlshaewwytmtnyzybl',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/messages/forward-message'
payload = {
"session_uuid": "ba84ae43-4419-3514-9b72-c73c9a0bd129",
"chat_id": "hvutufaqvqrexpjmzpd",
"message_id": "xfdgenocanzhamdlshaewwytmtnyzybl"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sessions V2
Returns All User Sessions.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v2/sessions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Creates New Session.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v2/sessions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"name\": \"kpknxq\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"name": "kpknxq"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'json' => [
'name' => 'kpknxq',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions'
payload = {
"name": "kpknxq"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Session Details.
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v2/sessions/status?session_uuid=CLOUD-WA-SESSION-UUID-2022" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en" \
--data "{
\"session_uuid\": \"e6d93768-7125-34cf-b3c5-0ba818124ecd\"
}"
const url = new URL(
"https://cloudwa.net/api/v2/sessions/status"
);
const params = {
"session_uuid": "CLOUD-WA-SESSION-UUID-2022",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
let body = {
"session_uuid": "e6d93768-7125-34cf-b3c5-0ba818124ecd"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v2/sessions/status';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
'query' => [
'session_uuid' => 'CLOUD-WA-SESSION-UUID-2022',
],
'json' => [
'session_uuid' => 'e6d93768-7125-34cf-b3c5-0ba818124ecd',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v2/sessions/status'
payload = {
"session_uuid": "e6d93768-7125-34cf-b3c5-0ba818124ecd"
}
params = {
'session_uuid': 'CLOUD-WA-SESSION-UUID-2022',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
OTPs V3
Register OTP in the System.
requires authentication
Example request:
curl --request POST \
"https://cloudwa.net/api/v3/3/otps" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v3/3/otps"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v3/3/otps';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v3/3/otps'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns Shared OTP Number to be used with generic otp validations (refer to customer service to subscribe)
requires authentication
Get OTP From the System
requires authentication
Example request:
curl --request GET \
--get "https://cloudwa.net/api/v3/3/otps/2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: en"
const url = new URL(
"https://cloudwa.net/api/v3/3/otps/2"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "en",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://cloudwa.net/api/v3/3/otps/2';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Accept-Language' => 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://cloudwa.net/api/v3/3/otps/2'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Accept-Language': 'en'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.