Skip to content

Submit Password ​

POST /session/password

The last login step for accounts with two-step verification. After the QR is scanned, Telegram still asks for your cloud password. Once Get Session shows isPasswordRequired: true, send the password to this endpoint.

Accounts without two-step verification never need this endpoint.

Endpoint Details ​

  • Base URL: https://api-zate.azickri.com
  • Headers: id, session-id, and Content-Type: application/json
  • Requirement: only valid while isPasswordRequired is true

Headers ​

HeaderTypeRequiredDescription
idstringYesid from Create Session.
session-idstringYessessionId from Create Session.

Request Body ​

FieldTypeRequiredDescription
passwordstringYesYour Telegram account's two-step verification password.

Example Request ​

bash
curl -X POST "https://api-zate.azickri.com/session/password" \
  -H "id: YOUR_ID" \
  -H "session-id: YOUR_SESSION_ID" \
  -H "Content-Type: application/json" \
  -d '{"password":"your-cloud-password"}'
javascript
import axios from 'axios';

const response = await axios.post(
  'https://api-zate.azickri.com/session/password',
  { password: 'your-cloud-password' },
  {
    headers: {
      'id': 'YOUR_ID',
      'session-id': 'YOUR_SESSION_ID',
    },
  },
);

console.log(response.data);
javascript
const response = await fetch('https://api-zate.azickri.com/session/password', {
  method: 'POST',
  headers: {
    'id': 'YOUR_ID',
    'session-id': 'YOUR_SESSION_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ password: 'your-cloud-password' }),
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "id": "68b3f0a2c1d4e5f6a7b8c9d0"
}
json
// Wrong password
{
  "statusCode": 400,
  "message": "invalid password"
}

// The session isn't waiting for a password
{
  "statusCode": 400,
  "message": "password is not required"
}

// Empty password
{
  "statusCode": 400,
  "message": "password should not be empty"
}
json
{
  "statusCode": 404,
  "message": "session not found"
}
FieldTypeDescription
idstringSession ID.

On success the session connects right away. Call Get Session and isConnected is already true.

Forgot the password?

The hint is in passwordHint. If you still can't remember it, reset it in Telegram on your phone (Settings → Privacy and Security → Two-Step Verification). Also keep in mind that a session that never gets its password is deleted after 30 minutes.

Don't guess

Too many wrong passwords make Telegram ask you to wait before trying again. The error will look like A wait of N seconds is required.