Create Session

Provisions a fresh Wawp instance and returns metadata such as instance_id and session_name.

POST
https://api.wawp.net/v2/session/create?access_token=YOUR_ACCESS_TOKEN

Authentication Required

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

Log In
Test /v2/session/create endpoint
POST
POST

No query parameters required

This endpoint doesn't expect data in the URL.

Best practices

  • Provision sessions 'On-Demand' to keep your dashboard clean and maximize your quota usage.

  • Always follow a Create call with a Start call to initiate the QR code generation process.

  • Ensure your database schema can handle 12-character alphanumeric strings for the 'instance_id'.

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

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/create";
3const params = new URLSearchParams({
4 "access_token": "YOUR_ACCESS_TOKEN"
5}).toString();
6
7
8fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
9 method: "POST",
10 headers: { "Content-Type": "application/json" },
11
12})
13 .then(async (response) => {
14 if (response.ok) {
15 const data = await response.json();
16 console.log("Success:", data);
17 return data;
18 }
19
20 // Error Handling
21 if (response.status === 400) {
22 console.error("Error 400: Bad Request - Missing Token");
23 }
24 if (response.status === 401) {
25 console.error("Error 401: Unauthorized - Invalid or Missing Access Token");
26 }
27 if (response.status === 403) {
28 console.error("Error 403: Forbidden - Quota or Limit Reached");
29 }
30 if (response.status === 500) {
31 console.error("Error 500: Internal Server Error - Unexpected Failure");
32 }
33
34 const errorText = await response.text();
35 console.error(`Error ${response.status}: ${errorText}`);
36 })
37 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 37, 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 - Session Created
Bad Request - Missing Token
Unauthorized - Invalid or Missing Access Token
Forbidden - Quota or Limit Reached
Internal Server Error - Unexpected Failure
Previous TopicSession Lifecycle
Next TopicStart Session

Command Palette

Search for a command to run...