Confirm passkey pairing code
curl --request POST \
--url https://api.wsapi.chat/session/passkey/confirm \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>'import requests
url = "https://api.wsapi.chat/session/passkey/confirm"
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Instance-Id': '<x-instance-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.wsapi.chat/session/passkey/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/session/passkey/confirm");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"status": 401,
"detail": "unauthorized"
}{
"status": 409,
"detail": "no passkey verification pending"
}{
"detail": "invalid request body",
"status": 400
}{
"status": 503,
"detail": "instance not available"
}Session
Confirm passkey pairing code
Fallback / compatibility endpoint. wsapi-app now sends the confirmation automatically as
soon as the status becomes confirmation_required (confirmationSent is true in
GET /session/passkey); the user only compares confirmationCode and approves on their
phone, and the link completes by itself. Clients do not need to call this.
If the confirmation was already sent, returns 204 without doing anything. Otherwise
sends it. Returns 409 if no step is in confirmation_required or the step has expired.
POST
/
session
/
passkey
/
confirm
Confirm passkey pairing code
curl --request POST \
--url https://api.wsapi.chat/session/passkey/confirm \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>'import requests
url = "https://api.wsapi.chat/session/passkey/confirm"
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Instance-Id': '<x-instance-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.wsapi.chat/session/passkey/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/session/passkey/confirm");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"status": 401,
"detail": "unauthorized"
}{
"status": 409,
"detail": "no passkey verification pending"
}{
"detail": "invalid request body",
"status": 400
}{
"status": 503,
"detail": "instance not available"
}Authorizations
Response
Confirmation sent to WhatsApp, or it had already been sent (no-op)
⌘I