TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: '919876543210', // the phone to act with (x-phone)
});
async function main() {
const response = await client.phones.getPhone();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/phones' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'{
"phone_id": "phone-aaaaaaaaaaaa",
"org_id": "00000000-0000-0000-0000-000000000000",
"org_phone": "911111111111@c.us",
"phone_name": "Support",
"phone_image": "https://example.com/files/image.png",
"wa_state": "CONNECTED",
"is_ready": true,
"qr_code": null,
"label_ids": {
"label-aaaaaaaaaaaa": true
},
"labels": [
"support",
"priority"
],
"is_browser_open": true,
"last_disconnect": null,
"queue_status": null,
"first_connected_at": "2026-01-15T09:30:00.000Z",
"created_at": "2026-01-10T12:00:00.000Z",
"updated_at": "2026-01-15T09:30:00.000Z"
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Phone APIs
Get phone
Returns the phone in the x-phone header, refreshing its state from the live instance when reachable.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: '919876543210', // the phone to act with (x-phone)
});
async function main() {
const response = await client.phones.getPhone();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/phones' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'{
"phone_id": "phone-aaaaaaaaaaaa",
"org_id": "00000000-0000-0000-0000-000000000000",
"org_phone": "911111111111@c.us",
"phone_name": "Support",
"phone_image": "https://example.com/files/image.png",
"wa_state": "CONNECTED",
"is_ready": true,
"qr_code": null,
"label_ids": {
"label-aaaaaaaaaaaa": true
},
"labels": [
"support",
"priority"
],
"is_browser_open": true,
"last_disconnect": null,
"queue_status": null,
"first_connected_at": "2026-01-15T09:30:00.000Z",
"created_at": "2026-01-10T12:00:00.000Z",
"updated_at": "2026-01-15T09:30:00.000Z"
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Authorizations
Headers
Response
The phone
A phone — a slot in the workspace that a WhatsApp account connects to by scanning a QR code. All phone-scoped endpoints act through one phone, selected with the x-phone header (org phone number or phone_id).
Was this page helpful?