setBusinessAccountNameПоддерживается
Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.
Особенности StaticGram
can_edit_name
Параметры
Unique identifier of the business connection
The new value of the first name for the business account; 1-64 characters
The new value of the last name for the business account; 0-64 characters
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/setBusinessAccountName" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>",
"first_name": "Иван"
}'aiogram 3
from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer
session = AiohttpSession(api=TelegramAPIServer.from_base("https://api.staticgram.top"))
bot = Bot(TOKEN, session=session)
result = await bot.set_business_account_name(
business_connection_id="<business_connection_id>",
first_name="Иван",
)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/setBusinessAccountName`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>",
"first_name": "Иван"
}),
});
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}