GET QR raw

Retrieves the raw QR payload as binary/base64 plus a mimetype.

POST
https://api.wawp.net/v2/auth/qr?instance_id=Your_Instance_ID&access_token=YOUR_ACCESS_TOKEN&format=raw

Authentication Required

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

Log In
Test /v2/auth/qr endpoint
POSTGET

No query parameters required

This endpoint doesn't expect data in the URL.

Best practices

  • Use this endpoint for custom CLI dashboards or mobile app integrations.

  • Decode the Base64 'data' field before passing it to a QR generation library.

  • Implement a polling mechanism to fetch a new code upon expiry.

Request Parameters

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

Request Body

Sent as a JSON object
string

The 12-character ID of the instance

Example:
string

Your API Access Token

Example:
string

Output format (default: raw)

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/auth/qr";
3const params = new URLSearchParams({
4 "instance_id": "Your_Instance_ID",
5 "access_token": "YOUR_ACCESS_TOKEN"
6}).toString();
7const body = {
8 "format": "raw"
9};
10
11fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
12 method: "POST",
13 headers: { "Content-Type": "application/json" },
14 body: JSON.stringify(body)
15})
16 .then(async (response) => {
17 if (response.ok) {
18 const data = await response.json();
19 console.log("Success:", data);
20 return data;
21 }
22
23 // Error Handling
24 if (response.status === 400) {
25 console.error("Error 400: Bad Request - Missing Required Parameter(s)");
26 }
27 if (response.status === 400) {
28 console.error("Error 400: Bad Request (XML Format)");
29 }
30 if (response.status === 400) {
31 console.error("Error 400: Bad Request (Plain Text)");
32 }
33 if (response.status === 401) {
34 console.error("Error 401: Unauthorized - Invalid or Missing Access Token");
35 }
36 if (response.status === 401) {
37 console.error("Error 401: Unauthorized (XML Format)");
38 }
39 if (response.status === 404) {
40 console.error("Error 404: Not Found - Session Does Not Exist");
41 }
42 if (response.status === 404) {
43 console.error("Error 404: Not Found (XML Format)");
44 }
45 if (response.status === 500) {
46 console.error("Error 500: Internal Server Error - Unexpected Failure");
47 }
48 if (response.status === 500) {
49 console.error("Error 500: Internal Server Error (HTML)");
50 }
51 if (response.status === 502) {
52 console.error("Error 502: Bad Gateway - Connection Failed to Upstream");
53 }
54 if (response.status === 502) {
55 console.error("Error 502: Bad Gateway (XML Format)");
56 }
57 if (response.status === 422) {
58 console.error("Error 422: Unprocessable Entity - Session Status Mismatch");
59 }
60
61 const errorText = await response.text();
62 console.error(`Error ${response.status}: ${errorText}`);
63 })
64 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 64, 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 - QR Raw Data
Type:
application/json
string *
string *

Example

{
"mimetype": "application/json; charset=utf-8",
"data": "eyJ2YWx1ZSI6IjJAR0JoWWtpTkV1U0tpeXpIeVVOYy9RQi9lTnhpSkJWSE96bGhOQ1daRERvRUZyOEhDWEhxTENKdEVpZHh6WWoxWkpqRzZ4K2NOaFVlVGlZeUJHWExJQzU1Z2ppKzRHQ2VyakRvPSIsImV4cGlyeSI6MTIzNDU2Nzg5MH0="
}
Bad Request - Missing Required Parameter(s)
Unauthorized - Invalid or Missing Access Token
Not Found - Session Does Not Exist
Unprocessable Entity - Session Status Mismatch
Internal Server Error - Unexpected Failure
Bad Gateway - Connection Failed to Upstream
Previous TopicAbout login authentication
Next TopicGet QR Image

Command Palette

Search for a command to run...