Temporary Access Link

Generate, retrieve, or revoke a temporary access link for a WhatsApp session. The link opens a QR-code page that can be used to connect or reconnect the session without exposing your credentials.

GET
https://api.wawp.net/v2/session/temp-link?access_token=YOUR_ACCESS_TOKEN&instance_id=Your_Instance_ID

Authentication Required

Login to swap the placeholders with your real Instance ID and Access Token.

Log In
Test /v2/session/temp-link endpoint
GETPOSTDELETE

No query parameters required

This endpoint doesn't expect data in the URL.

Best practices

  • Generate a new link just before the user is ready to scan the QR code.

  • Call DELETE after a successful connection to prevent replay.

Temporary Access Link: /v2/session/temp-link

This endpoint manages short-lived QR-code links for a session. The generated link points to https://app.wawp.net/temp-qr/{token} and is valid for 30 minutes.

Use Cases

  • Support scenarios: Allow a support agent to scan the QR code and connect a client's number without sharing the main credentials.
  • Remote onboarding: Send the link to a team member so they can finish the WhatsApp connection on their own device.
  • Quick reconnection: Regenerate a fresh link after a logout or session restart.

Endpoints

GET /v2/session/temp-link

Returns the currently active link, if any. Returns { link: null } when no active link exists.

POST /v2/session/temp-link

Expires any existing active link and generates a new one. Returns the new link and its expiration time.

DELETE /v2/session/temp-link

Immediately revokes all active temporary links for the session.

Security Notes

  • Links are single-use in practice: generating a new link expires the previous one.
  • The token is random and 64 characters long.
  • Always revoke links once they are no longer needed.

Request Parameters

Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.

URL Parameters

Passed in the URL query string
string

The 12-character ID of the instance

Example:
string

Your API Access Token

Example:

Request Samples

Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.

1const baseUrl = "https://api.wawp.net";
2const endpoint = "/v2/session/temp-link";
3const params = new URLSearchParams({
4 "instance_id": "Your_Instance_ID",
5 "access_token": "YOUR_ACCESS_TOKEN"
6}).toString();
7
8
9fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
10 method: "GET",
11 headers: { "Content-Type": "application/json" },
12
13})
14 .then(async (response) => {
15 if (response.ok) {
16 const data = await response.json();
17 console.log("Success:", data);
18 return data;
19 }
20
21 // Error Handling
22 if (response.status === 400) {
23 console.error("Error 400: Bad Request - Missing access_token or instance_id");
24 }
25 if (response.status === 401) {
26 console.error("Error 401: Unauthorized - Invalid access token or instance ID");
27 }
28
29 const errorText = await response.text();
30 console.error(`Error ${response.status}: ${errorText}`);
31 })
32 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 32, Col 1javascript

Expected Responses

Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.

Success - Link retrieved or generated
application/json
string *
string *
string *
string *

Example

{
"status": "success",
"link": "https://app.wawp.net/temp-qr/a1b2c3d4e5f6...",
"expires_at": "2026-06-19T19:25:00.000Z",
"message": "Temporary access link generated successfully"
}
Bad Request - Missing access_token or instance_id
Unauthorized - Invalid access token or instance ID
Previous TopicSession Rate Limits
Next TopicLogout Session

Command Palette

Search for a command to run...