API
- Introduction
- Authorization
- SDK
- Objects
Chat APIs
Group Settings APIs
Message APIs
Contact APIs
Phone APIs
Phone APIs
Get All Phones
This endpoint retrieves a list of all phones associated with this account
Response
The response is a JSON array of phone objects. Refer to the phone object here
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function getAllPhones() {
const response = await client.phone.getAll();
console.log(response);
}
getAllPhones();
[
{
"created_at": "2024-12-31T17:51:15.977006+00:00",
"first_connected_at": "2025-01-16T18:31:43.921+00:00",
"is_ready": true,
"label_ids": {},
"labels": [],
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "919971844008@c.us",
"phone_id": "phone-njjnpbeheymosvlo",
"phone_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919971844008%40c.us.jpg?timestamp=1737098940409",
"phone_name": "Periskope",
"qr_code": null,
"updated_at": "2025-01-17T08:44:02.6+00:00",
"wa_state": "CONNECTED"
},
{
"created_at": "2024-12-15T11:47:26.668505+00:00",
"first_connected_at": "2024-12-15T11:47:49.649+00:00",
"is_ready": true,
"label_ids": {
"label-bflirzqiodgianfh": true,
"label-rbdshklasmlbfczf": true
},
"labels": [
"test1",
"test2"
],
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us",
"phone_id": "phone-bqzvyibhmwkaergr",
"phone_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us.jpg?timestamp=1737141384215",
"phone_name": "Support",
"qr_code": null,
"updated_at": "2025-01-20T07:51:48.209+00:00",
"wa_state": "CONNECTED"
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200 - application/json
200 OK
The response is of type object[]
.
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function getAllPhones() {
const response = await client.phone.getAll();
console.log(response);
}
getAllPhones();
[
{
"created_at": "2024-12-31T17:51:15.977006+00:00",
"first_connected_at": "2025-01-16T18:31:43.921+00:00",
"is_ready": true,
"label_ids": {},
"labels": [],
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "919971844008@c.us",
"phone_id": "phone-njjnpbeheymosvlo",
"phone_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919971844008%40c.us.jpg?timestamp=1737098940409",
"phone_name": "Periskope",
"qr_code": null,
"updated_at": "2025-01-17T08:44:02.6+00:00",
"wa_state": "CONNECTED"
},
{
"created_at": "2024-12-15T11:47:26.668505+00:00",
"first_connected_at": "2024-12-15T11:47:49.649+00:00",
"is_ready": true,
"label_ids": {
"label-bflirzqiodgianfh": true,
"label-rbdshklasmlbfczf": true
},
"labels": [
"test1",
"test2"
],
"org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
"org_phone": "918527184400@c.us",
"phone_id": "phone-bqzvyibhmwkaergr",
"phone_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us.jpg?timestamp=1737141384215",
"phone_name": "Support",
"qr_code": null,
"updated_at": "2025-01-20T07:51:48.209+00:00",
"wa_state": "CONNECTED"
}
]
Assistant
Responses are generated using AI and may contain mistakes.