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.restartPhone();
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/phones/restart' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'Phone APIs
Restart Phone
Restarts the instance of the phone — works even while the phone server is switched off.
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.restartPhone();
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/phones/restart' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'Authorizations
Headers
Response
Restart triggered — no content
Was this page helpful?