I'm trying to call the setMyCommands
API via curl
according to this answer. I first tried
curl -L -X "POST" \
"https://api.telegram.org/bot$TELEGRAM_TOKEN"'/setMyCommands?commands=[{ "command": "command", "description": "description" }]'
curl
printed the following error.
curl: (3) bad range specification in URL position
Then I tried to use curl
with --globoff
flag.
curl --globoff -L -X "POST" \
"https://api.telegram.org/bot$TELEGRAM_TOKEN"'/setMyCommands?commands=[{ "command": "command", "description": "description" }]'
Now it printed the following error.
curl: (3) URL using bad/illegal format or missing URL
What is the correct way to call it?