Introduction
At its core, you can think of the SafeW Bot API as software that provides JSON-encoded responses to your queries.
A bot, on the other hand, is essentially a routine, software or script that queries the API by means of an HTTPS request and waits for a response. There are several types of requests you can make, as well as many different objects that you can use and receive as responses.
Since your browser is capable of sending HTTPS requests, you can use it to quickly try out the API. After obtaining your token, try pasting this string into your browser:
In theory, you could interact with the API with basic requests like this, either via your browser or other tailor-made tools like cURL. While this can work for simple requests like the example above, it's not practical for larger applications and doesn't scale well.
Obtain Your Bot Token In this context, a token is a string that authenticates your bot (not your account) on the bot API. Each bot has a unique token which can also be revoked at any time via @BotFather.
Obtaining a token is as simple as contacting @BotFather, issuing the command and following the steps until you're given a new token. You can find a step-by-step guide here.
Your token will look something like this:
Last updated