Перейти к основному содержанию
PATCH
/
v1
/
profile
/
change-login
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.changeLogin({ new_login: 'username' });

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

Авторизации

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

API-key that you received from Telegram Bot.

Тело

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

User login for registration

Required string length: 3 - 20
Pattern: ^[a-zA-Z0-9._]+$
Пример:

"username"

Ответ

200 - application/json

Response for status 200

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

Indicates if the operation was successful

Пример:

true