English
Create Session
POST/sessionThe front door to everything in Zawa. This endpoint creates a new session and gives you an id and a sessionId, which act as the "keys" for every other endpoint. No headers or body needed.
IMPORTANT
- The QR code is generated in the background, so this response does not include it yet. Call Get Session a few seconds later to fetch it.
- If the QR code isn't scanned within about 3 minutes, the session is deleted automatically. No worries, just create another one.
Endpoint Details
- Base URL:
https://api-zawa.azickri.com - Headers: none
- Request body: none
Example Request
bash
curl -X POST "https://api-zawa.azickri.com/session"javascript
import axios from 'axios';
const response = await axios.post('https://api-zawa.azickri.com/session');
console.log(response.data);javascript
const response = await fetch('https://api-zawa.azickri.com/session', {
method: 'POST',
});
const data = await response.json();
console.log(data);Response
json
{
"id": "68b3f0a2c1d4e5f6a7b8c9d0",
"sessionId": "0b2f7059-8a90-4f6d-8684-b0e1ce6f0310"
}json
{
"statusCode": 500,
"message": "internal server error"
}| Field | Type | Description |
|---|---|---|
id | string | The session's main ID. Send it as the id header. |
sessionId | string | The session's unique identifier. Send it as the session-id header. |
Next
Call Get Session right away to fetch the QR code, then scan it with your phone. The full flow is in the Quick Start.