Skip to main content

Getting Started with Telemetr.io API

Step 1: Register on Telemetr.io

To get started, you need to be a registered user on the telemetr.io website. If you haven't registered yet, simply go to the website and click the "Sign In" button.

Step 2: Obtain Your API Key

Next, go to the @telemetrio_api_bot bot and enter the command /api_key.

Bot api key

The bot will provide you with a private key for API access.

Important: Keep your key confidential.

Step 3: Explore API Methods

Now that you have the access key, you can start making API requests. You can find a list of available methods here: https://api.telemetr.io/swagger-ui/.

Step 4: Make API Requests

The private key you received from the bot must be passed in the request headers in the x-api-key field.

Now check if all works.

Here is an example of a request to get a list of countries that channels can be assigned to during moderation:

CURL
curl -X GET "https://api.telemetr.io/v1/dictionaries/countries" \
-H "accept: application/json"\
-H "x-api-key: YOUR_KEY_HERE"
Response
[
{
"id": "india",
"name": "india",
"channels_count": 3781,
"participants_count": 619799753
},
{
"id": "saudi_arabia",
"name": "saudi_arabia",
"channels_count": 471,
"participants_count": 47225086
},
{
"id": "ukraine",
"name": "ukraine",
"channels_count": 641,
"participants_count": 109333990
},
{
"id": "indonesia",
"name": "indonesia",
"channels_count": 454,
"participants_count": 53614809
}
...
]

What next?

Generate Client Libraries in the Language of Your Choice

The Telemetr.io API empowers you to unlock valuable Telegram channel data programmatically. But wouldn't it be easier to interact with the API using your preferred language and tools? With Swagger Codegen, you can do just that!

Generate custom client libraries for numerous languages, including:

  • Node.js (TypeScript)
  • Python
  • PHP
  • Java
  • Ruby
  • C#
  • Go
  • Swift
  • Kotlin
  • And many more!

Benefits of using client libraries:

  • Simplify API interactions: Write clean and concise code for making API requests and handling responses.
  • Reduce boilerplate code: Spend less time on repetitive tasks and focus on your specific application logic.
  • Strong typing and error handling: Benefit from language features like type checking and error handling for robust and reliable code.
  • Integration with your tools: Seamlessly integrate the Telemetr.io API with your existing development environment.

How to generate client for my language?

Additional Resources:

I hope this guide helps you get started with the Telemetr.io API! Feel free to ask if you have any questions.