Перейти к основному содержанию
PATCH
/
v1
/
profile
/
change-password
JavaScript
import Gmt from 'gmt-typescript-sdk';

const client = new Gmt({
  apiKey: process.env['GMT_API_KEY'], // This is the default and can be omitted
});

const response = await client.profile.changePassword({ new_password: 'Password123' });

console.log(response.success);
{
  "success": true
}

Авторизации

x-api-key
string
header
обязательно

API-key that you received from Telegram Bot.

Тело

new_password
string
обязательно

User password. Must contain at least two character types: lowercase, uppercase, digits, or special characters

Required string length: 8 - 64
Пример:

"Password123"

Ответ

200 - application/json

Response for status 200

success
boolean
обязательно

Indicates if the operation was successful

Пример:

true