Bale bot API

Attachments

getFile


/bot{token}/getFile

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/getFile?file_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String token = token_example; // String | bot's token to authorize the request
        String fileId = fileId_example; // String | 
        try {
            inline_response_200_1 result = apiInstance.getFile(token, fileId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getFile");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String token = token_example; // String | bot's token to authorize the request
        String fileId = fileId_example; // String | 
        try {
            inline_response_200_1 result = apiInstance.getFile(token, fileId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getFile");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
String *fileId = fileId_example; // 

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance getFileWith:token
    fileId:fileId
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var token = token_example; // {{String}} bot's token to authorize the request
var fileId = fileId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFile(token, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFileExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var fileId = fileId_example;  // String | 

            try
            {
                inline_response_200_1 result = apiInstance.getFile(token, fileId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.getFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$token = token_example; // String | bot's token to authorize the request
$fileId = fileId_example; // String | 

try {
    $result = $api_instance->getFile($token, $fileId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $fileId = fileId_example; # String | 

eval { 
    my $result = $api_instance->getFile(token => $token, fileId => $fileId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getFile: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
token = token_example # String | bot's token to authorize the request
fileId = fileId_example # String | 

try: 
    api_response = api_instance.get_file(token, fileId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getFile: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Query parameters
Name Description
file_id*
String
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendAudio

سرویس برای ارسال فایل های صوتی استفاده می‌شود. لازم به ذکر است محدودیت ارسال فایل صوتی برای بازو ۱۰۰ مگابایت هست که ممکن است در آینده تغییر کند


/bot{token}/sendAudio

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendAudio"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] audio = audio_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer duration = 56; // Integer | 
        String title = title_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendAudio(chatId, audio, caption, duration, title, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendAudio");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] audio = audio_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer duration = 56; // Integer | 
        String title = title_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendAudio(chatId, audio, caption, duration, title, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendAudio");
            e.printStackTrace();
        }
    }
}
String *chatId = chatId_example; // 
byte[] *audio = audio_example; // 
String *caption = caption_example; // 
Integer *duration = 56; // 
String *title = title_example; // 
Integer *replyToMessageId = 56; // 
String *token = token_example; // bot's token to authorize the request

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendAudioWith:chatId
    audio:audio
    caption:caption
    duration:duration
    title:title
    replyToMessageId:replyToMessageId
    token:token
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var chatId = chatId_example; // {{String}} 
var audio = audio_example; // {{byte[]}} 
var caption = caption_example; // {{String}} 
var duration = 56; // {{Integer}} 
var title = title_example; // {{String}} 
var replyToMessageId = 56; // {{Integer}} 
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendAudio(chatIdaudiocaptiondurationtitlereplyToMessageIdtoken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendAudioExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var chatId = chatId_example;  // String | 
            var audio = audio_example;  // byte[] | 
            var caption = caption_example;  // String | 
            var duration = 56;  // Integer | 
            var title = title_example;  // String | 
            var replyToMessageId = 56;  // Integer | 
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseMessage result = apiInstance.sendAudio(chatId, audio, caption, duration, title, replyToMessageId, token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendAudio: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$chatId = chatId_example; // String | 
$audio = audio_example; // byte[] | 
$caption = caption_example; // String | 
$duration = 56; // Integer | 
$title = title_example; // String | 
$replyToMessageId = 56; // Integer | 
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->sendAudio($chatId, $audio, $caption, $duration, $title, $replyToMessageId, $token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendAudio: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $chatId = chatId_example; # String | 
my $audio = audio_example; # byte[] | 
my $caption = caption_example; # String | 
my $duration = 56; # Integer | 
my $title = title_example; # String | 
my $replyToMessageId = 56; # Integer | 
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->sendAudio(chatId => $chatId, audio => $audio, caption => $caption, duration => $duration, title => $title, replyToMessageId => $replyToMessageId, token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendAudio: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
chatId = chatId_example # String | 
audio = audio_example # byte[] | 
caption = caption_example # String | 
duration = 56 # Integer | 
title = title_example # String | 
replyToMessageId = 56 # Integer | 
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.send_audio(chatId, audio, caption, duration, title, replyToMessageId, token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendAudio: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Form parameters
Name Description
chat_id*
String
Required
audio*
byte[] (binary)
Required
caption*
String
Required
duration*
Integer
Required
title*
String
Required
reply_to_message_id*
Integer
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendContact

این سرویس برای ارسال اطلاعات مخاطب که در دفترچه تلفن موجود است استفاده می‌شود.


/bot{token}/sendContact

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendContact"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String token = token_example; // String | bot's token to authorize the request
        SendContactBody body = ; // SendContactBody | 
        try {
            ResponseMessage result = apiInstance.sendContact(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendContact");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String token = token_example; // String | bot's token to authorize the request
        SendContactBody body = ; // SendContactBody | 
        try {
            ResponseMessage result = apiInstance.sendContact(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendContact");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
SendContactBody *body = ; //  (optional)

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendContactWith:token
    body:body
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendContact(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendContactExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var body = new SendContactBody(); // SendContactBody |  (optional) 

            try
            {
                ResponseMessage result = apiInstance.sendContact(token, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendContact: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$token = token_example; // String | bot's token to authorize the request
$body = ; // SendContactBody | 

try {
    $result = $api_instance->sendContact($token, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendContact: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $body = WWW::SwaggerClient::Object::SendContactBody->new(); # SendContactBody | 

eval { 
    my $result = $api_instance->sendContact(token => $token, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendContact: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
token = token_example # String | bot's token to authorize the request
body =  # SendContactBody |  (optional)

try: 
    api_response = api_instance.send_contact(token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendContact: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Body parameters
Name Description
body

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendDocument

cccc


/bot{token}/sendDocument

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendDocument"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] document = document_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendDocument(chatId, document, caption, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendDocument");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] document = document_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendDocument(chatId, document, caption, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendDocument");
            e.printStackTrace();
        }
    }
}
String *chatId = chatId_example; // 
byte[] *document = document_example; // 
String *caption = caption_example; // 
Integer *replyToMessageId = 56; // 
String *token = token_example; // bot's token to authorize the request

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendDocumentWith:chatId
    document:document
    caption:caption
    replyToMessageId:replyToMessageId
    token:token
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var chatId = chatId_example; // {{String}} 
var document = document_example; // {{byte[]}} 
var caption = caption_example; // {{String}} 
var replyToMessageId = 56; // {{Integer}} 
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendDocument(chatIddocumentcaptionreplyToMessageIdtoken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendDocumentExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var chatId = chatId_example;  // String | 
            var document = document_example;  // byte[] | 
            var caption = caption_example;  // String | 
            var replyToMessageId = 56;  // Integer | 
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseMessage result = apiInstance.sendDocument(chatId, document, caption, replyToMessageId, token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendDocument: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$chatId = chatId_example; // String | 
$document = document_example; // byte[] | 
$caption = caption_example; // String | 
$replyToMessageId = 56; // Integer | 
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->sendDocument($chatId, $document, $caption, $replyToMessageId, $token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendDocument: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $chatId = chatId_example; # String | 
my $document = document_example; # byte[] | 
my $caption = caption_example; # String | 
my $replyToMessageId = 56; # Integer | 
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->sendDocument(chatId => $chatId, document => $document, caption => $caption, replyToMessageId => $replyToMessageId, token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendDocument: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
chatId = chatId_example # String | 
document = document_example # byte[] | 
caption = caption_example # String | 
replyToMessageId = 56 # Integer | 
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.send_document(chatId, document, caption, replyToMessageId, token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendDocument: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Form parameters
Name Description
chat_id*
String
Required
document*
byte[] (binary)
Required
caption*
String
Required
reply_to_message_id*
Integer
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendLocation

این سرویس برای ارسال موقعیت جغرافیایی روی نقشه استفاده می‌شود.


/bot{token}/sendLocation

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendLocation"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String token = token_example; // String | bot's token to authorize the request
        SendLocationBody body = ; // SendLocationBody | 
        try {
            ResponseMessage result = apiInstance.sendLocation(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String token = token_example; // String | bot's token to authorize the request
        SendLocationBody body = ; // SendLocationBody | 
        try {
            ResponseMessage result = apiInstance.sendLocation(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendLocation");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
SendLocationBody *body = ; //  (optional)

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendLocationWith:token
    body:body
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendLocation(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendLocationExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var body = new SendLocationBody(); // SendLocationBody |  (optional) 

            try
            {
                ResponseMessage result = apiInstance.sendLocation(token, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendLocation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$token = token_example; // String | bot's token to authorize the request
$body = ; // SendLocationBody | 

try {
    $result = $api_instance->sendLocation($token, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $body = WWW::SwaggerClient::Object::SendLocationBody->new(); # SendLocationBody | 

eval { 
    my $result = $api_instance->sendLocation(token => $token, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendLocation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
token = token_example # String | bot's token to authorize the request
body =  # SendLocationBody |  (optional)

try: 
    api_response = api_instance.send_location(token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendLocation: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Body parameters
Name Description
body

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendPhoto

این سرویس برای ارسال عکس استفاده می‌شود


/bot{token}/sendPhoto

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendPhoto"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] photo = photo_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendPhoto(chatId, photo, caption, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendPhoto");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] photo = photo_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendPhoto(chatId, photo, caption, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendPhoto");
            e.printStackTrace();
        }
    }
}
String *chatId = chatId_example; // 
byte[] *photo = photo_example; // 
String *caption = caption_example; // 
Integer *replyToMessageId = 56; // 
String *token = token_example; // bot's token to authorize the request

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendPhotoWith:chatId
    photo:photo
    caption:caption
    replyToMessageId:replyToMessageId
    token:token
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var chatId = chatId_example; // {{String}} 
var photo = photo_example; // {{byte[]}} 
var caption = caption_example; // {{String}} 
var replyToMessageId = 56; // {{Integer}} 
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendPhoto(chatIdphotocaptionreplyToMessageIdtoken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendPhotoExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var chatId = chatId_example;  // String | 
            var photo = photo_example;  // byte[] | 
            var caption = caption_example;  // String | 
            var replyToMessageId = 56;  // Integer | 
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseMessage result = apiInstance.sendPhoto(chatId, photo, caption, replyToMessageId, token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendPhoto: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$chatId = chatId_example; // String | 
$photo = photo_example; // byte[] | 
$caption = caption_example; // String | 
$replyToMessageId = 56; // Integer | 
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->sendPhoto($chatId, $photo, $caption, $replyToMessageId, $token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendPhoto: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $chatId = chatId_example; # String | 
my $photo = photo_example; # byte[] | 
my $caption = caption_example; # String | 
my $replyToMessageId = 56; # Integer | 
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->sendPhoto(chatId => $chatId, photo => $photo, caption => $caption, replyToMessageId => $replyToMessageId, token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendPhoto: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
chatId = chatId_example # String | 
photo = photo_example # byte[] | 
caption = caption_example # String | 
replyToMessageId = 56 # Integer | 
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.send_photo(chatId, photo, caption, replyToMessageId, token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendPhoto: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Form parameters
Name Description
chat_id*
String
Required
photo*
byte[] (binary)
Required
caption*
String
Required
reply_to_message_id*
Integer
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendVideo

این سرویس برای ارسال فایل‌های صوتی استفاده می‌شود که دارای محدودیت حجم ۵۰ مگابایت برای هر فایل است که ممکن است در آینده تغییر کند.


/bot{token}/sendVideo

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendVideo"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] video = video_example; // byte[] | 
        Integer duration = 56; // Integer | 
        Integer width = 56; // Integer | 
        Integer height = 56; // Integer | 
        String caption = caption_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendVideo(chatId, video, duration, width, height, caption, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendVideo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] video = video_example; // byte[] | 
        Integer duration = 56; // Integer | 
        Integer width = 56; // Integer | 
        Integer height = 56; // Integer | 
        String caption = caption_example; // String | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendVideo(chatId, video, duration, width, height, caption, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendVideo");
            e.printStackTrace();
        }
    }
}
String *chatId = chatId_example; // 
byte[] *video = video_example; // 
Integer *duration = 56; // 
Integer *width = 56; // 
Integer *height = 56; // 
String *caption = caption_example; // 
Integer *replyToMessageId = 56; // 
String *token = token_example; // bot's token to authorize the request

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendVideoWith:chatId
    video:video
    duration:duration
    width:width
    height:height
    caption:caption
    replyToMessageId:replyToMessageId
    token:token
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var chatId = chatId_example; // {{String}} 
var video = video_example; // {{byte[]}} 
var duration = 56; // {{Integer}} 
var width = 56; // {{Integer}} 
var height = 56; // {{Integer}} 
var caption = caption_example; // {{String}} 
var replyToMessageId = 56; // {{Integer}} 
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendVideo(chatIdvideodurationwidthheightcaptionreplyToMessageIdtoken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendVideoExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var chatId = chatId_example;  // String | 
            var video = video_example;  // byte[] | 
            var duration = 56;  // Integer | 
            var width = 56;  // Integer | 
            var height = 56;  // Integer | 
            var caption = caption_example;  // String | 
            var replyToMessageId = 56;  // Integer | 
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseMessage result = apiInstance.sendVideo(chatId, video, duration, width, height, caption, replyToMessageId, token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendVideo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$chatId = chatId_example; // String | 
$video = video_example; // byte[] | 
$duration = 56; // Integer | 
$width = 56; // Integer | 
$height = 56; // Integer | 
$caption = caption_example; // String | 
$replyToMessageId = 56; // Integer | 
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->sendVideo($chatId, $video, $duration, $width, $height, $caption, $replyToMessageId, $token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendVideo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $chatId = chatId_example; # String | 
my $video = video_example; # byte[] | 
my $duration = 56; # Integer | 
my $width = 56; # Integer | 
my $height = 56; # Integer | 
my $caption = caption_example; # String | 
my $replyToMessageId = 56; # Integer | 
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->sendVideo(chatId => $chatId, video => $video, duration => $duration, width => $width, height => $height, caption => $caption, replyToMessageId => $replyToMessageId, token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendVideo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
chatId = chatId_example # String | 
video = video_example # byte[] | 
duration = 56 # Integer | 
width = 56 # Integer | 
height = 56 # Integer | 
caption = caption_example # String | 
replyToMessageId = 56 # Integer | 
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.send_video(chatId, video, duration, width, height, caption, replyToMessageId, token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendVideo: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Form parameters
Name Description
chat_id*
String
Required
video*
byte[] (binary)
Required
duration*
Integer
Required
width*
Integer
Required
height*
Integer
Required
caption*
String
Required
reply_to_message_id*
Integer
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendVoice

برای ارسال پیام‌های صوتی که قابل اجرا باشند باید از طریق این سرویس فایل‌هایی با پسوند 'opus' ارسال کنید؛ فرمت‌های دیگر در قالب فایل عمومی ارسال میشوند. همچنین دارای محدودیت حجم ۵۰ مگابایت برای هر فایل است که ممکن است در آینده تغییر کند.


/bot{token}/sendVoice

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendVoice"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] voice = voice_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer duration = 56; // Integer | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendVoice(chatId, voice, caption, duration, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendVoice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String chatId = chatId_example; // String | 
        byte[] voice = voice_example; // byte[] | 
        String caption = caption_example; // String | 
        Integer duration = 56; // Integer | 
        Integer replyToMessageId = 56; // Integer | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseMessage result = apiInstance.sendVoice(chatId, voice, caption, duration, replyToMessageId, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#sendVoice");
            e.printStackTrace();
        }
    }
}
String *chatId = chatId_example; // 
byte[] *voice = voice_example; // 
String *caption = caption_example; // 
Integer *duration = 56; // 
Integer *replyToMessageId = 56; // 
String *token = token_example; // bot's token to authorize the request

AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

[apiInstance sendVoiceWith:chatId
    voice:voice
    caption:caption
    duration:duration
    replyToMessageId:replyToMessageId
    token:token
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.AttachmentsApi()
var chatId = chatId_example; // {{String}} 
var voice = voice_example; // {{byte[]}} 
var caption = caption_example; // {{String}} 
var duration = 56; // {{Integer}} 
var replyToMessageId = 56; // {{Integer}} 
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendVoice(chatIdvoicecaptiondurationreplyToMessageIdtoken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendVoiceExample
    {
        public void main()
        {

            var apiInstance = new AttachmentsApi();
            var chatId = chatId_example;  // String | 
            var voice = voice_example;  // byte[] | 
            var caption = caption_example;  // String | 
            var duration = 56;  // Integer | 
            var replyToMessageId = 56;  // Integer | 
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseMessage result = apiInstance.sendVoice(chatId, voice, caption, duration, replyToMessageId, token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.sendVoice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAttachmentsApi();
$chatId = chatId_example; // String | 
$voice = voice_example; // byte[] | 
$caption = caption_example; // String | 
$duration = 56; // Integer | 
$replyToMessageId = 56; // Integer | 
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->sendVoice($chatId, $voice, $caption, $duration, $replyToMessageId, $token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->sendVoice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $chatId = chatId_example; # String | 
my $voice = voice_example; # byte[] | 
my $caption = caption_example; # String | 
my $duration = 56; # Integer | 
my $replyToMessageId = 56; # Integer | 
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->sendVoice(chatId => $chatId, voice => $voice, caption => $caption, duration => $duration, replyToMessageId => $replyToMessageId, token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->sendVoice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
chatId = chatId_example # String | 
voice = voice_example # byte[] | 
caption = caption_example # String | 
duration = 56 # Integer | 
replyToMessageId = 56 # Integer | 
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.send_voice(chatId, voice, caption, duration, replyToMessageId, token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->sendVoice: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Form parameters
Name Description
chat_id*
String
Required
voice*
byte[] (binary)
Required
caption*
String
Required
duration*
Integer
Required
reply_to_message_id*
Integer
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


Chats

getChat


/bot{token}/getChat

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/getChat?chat_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChatsApi;

import java.io.File;
import java.util.*;

public class ChatsApiExample {

    public static void main(String[] args) {
        
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        try {
            inline_response_200_2 result = apiInstance.getChat(token, chatId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChat");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChatsApi;

public class ChatsApiExample {

    public static void main(String[] args) {
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        try {
            inline_response_200_2 result = apiInstance.getChat(token, chatId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChat");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
String *chatId = chatId_example; // 

ChatsApi *apiInstance = [[ChatsApi alloc] init];

[apiInstance getChatWith:token
    chatId:chatId
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.ChatsApi()
var token = token_example; // {{String}} bot's token to authorize the request
var chatId = chatId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getChat(token, chatId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getChatExample
    {
        public void main()
        {

            var apiInstance = new ChatsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var chatId = chatId_example;  // String | 

            try
            {
                inline_response_200_2 result = apiInstance.getChat(token, chatId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChatsApi.getChat: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChatsApi();
$token = token_example; // String | bot's token to authorize the request
$chatId = chatId_example; // String | 

try {
    $result = $api_instance->getChat($token, $chatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChatsApi->getChat: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChatsApi;

my $api_instance = WWW::SwaggerClient::ChatsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $chatId = chatId_example; # String | 

eval { 
    my $result = $api_instance->getChat(token => $token, chatId => $chatId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ChatsApi->getChat: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChatsApi()
token = token_example # String | bot's token to authorize the request
chatId = chatId_example # String | 

try: 
    api_response = api_instance.get_chat(token, chatId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChatsApi->getChat: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Query parameters
Name Description
chat_id*
String
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


getChatAdministrators


/bot{token}/getChatAdministrators

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/getChatAdministrators?chat_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChatsApi;

import java.io.File;
import java.util.*;

public class ChatsApiExample {

    public static void main(String[] args) {
        
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        try {
            inline_response_200_3 result = apiInstance.getChatAdministrators(token, chatId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChatAdministrators");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChatsApi;

public class ChatsApiExample {

    public static void main(String[] args) {
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        try {
            inline_response_200_3 result = apiInstance.getChatAdministrators(token, chatId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChatAdministrators");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
String *chatId = chatId_example; // 

ChatsApi *apiInstance = [[ChatsApi alloc] init];

[apiInstance getChatAdministratorsWith:token
    chatId:chatId
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.ChatsApi()
var token = token_example; // {{String}} bot's token to authorize the request
var chatId = chatId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getChatAdministrators(token, chatId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getChatAdministratorsExample
    {
        public void main()
        {

            var apiInstance = new ChatsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var chatId = chatId_example;  // String | 

            try
            {
                inline_response_200_3 result = apiInstance.getChatAdministrators(token, chatId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChatsApi.getChatAdministrators: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChatsApi();
$token = token_example; // String | bot's token to authorize the request
$chatId = chatId_example; // String | 

try {
    $result = $api_instance->getChatAdministrators($token, $chatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChatsApi->getChatAdministrators: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChatsApi;

my $api_instance = WWW::SwaggerClient::ChatsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $chatId = chatId_example; # String | 

eval { 
    my $result = $api_instance->getChatAdministrators(token => $token, chatId => $chatId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ChatsApi->getChatAdministrators: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChatsApi()
token = token_example # String | bot's token to authorize the request
chatId = chatId_example # String | 

try: 
    api_response = api_instance.get_chat_administrators(token, chatId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChatsApi->getChatAdministrators: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Query parameters
Name Description
chat_id*
String
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


getChatMember


/bot{token}/getChatMember

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/getChatMember?chat_id=&user_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChatsApi;

import java.io.File;
import java.util.*;

public class ChatsApiExample {

    public static void main(String[] args) {
        
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        String userId = userId_example; // String | 
        try {
            inline_response_200_5 result = apiInstance.getChatMember(token, chatId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChatMember");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChatsApi;

public class ChatsApiExample {

    public static void main(String[] args) {
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        String userId = userId_example; // String | 
        try {
            inline_response_200_5 result = apiInstance.getChatMember(token, chatId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChatMember");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
String *chatId = chatId_example; // 
String *userId = userId_example; // 

ChatsApi *apiInstance = [[ChatsApi alloc] init];

[apiInstance getChatMemberWith:token
    chatId:chatId
    userId:userId
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.ChatsApi()
var token = token_example; // {{String}} bot's token to authorize the request
var chatId = chatId_example; // {{String}} 
var userId = userId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getChatMember(token, chatId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getChatMemberExample
    {
        public void main()
        {

            var apiInstance = new ChatsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var chatId = chatId_example;  // String | 
            var userId = userId_example;  // String | 

            try
            {
                inline_response_200_5 result = apiInstance.getChatMember(token, chatId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChatsApi.getChatMember: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChatsApi();
$token = token_example; // String | bot's token to authorize the request
$chatId = chatId_example; // String | 
$userId = userId_example; // String | 

try {
    $result = $api_instance->getChatMember($token, $chatId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChatsApi->getChatMember: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChatsApi;

my $api_instance = WWW::SwaggerClient::ChatsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $chatId = chatId_example; # String | 
my $userId = userId_example; # String | 

eval { 
    my $result = $api_instance->getChatMember(token => $token, chatId => $chatId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ChatsApi->getChatMember: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChatsApi()
token = token_example # String | bot's token to authorize the request
chatId = chatId_example # String | 
userId = userId_example # String | 

try: 
    api_response = api_instance.get_chat_member(token, chatId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChatsApi->getChatMember: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Query parameters
Name Description
chat_id*
String
Required
user_id*
String
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


getChatMembersCount


/bot{token}/getChatMembersCount

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/getChatMembersCount?chat_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChatsApi;

import java.io.File;
import java.util.*;

public class ChatsApiExample {

    public static void main(String[] args) {
        
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        try {
            inline_response_200_4 result = apiInstance.getChatMembersCount(token, chatId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChatMembersCount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChatsApi;

public class ChatsApiExample {

    public static void main(String[] args) {
        ChatsApi apiInstance = new ChatsApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        try {
            inline_response_200_4 result = apiInstance.getChatMembersCount(token, chatId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChatsApi#getChatMembersCount");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
String *chatId = chatId_example; // 

ChatsApi *apiInstance = [[ChatsApi alloc] init];

[apiInstance getChatMembersCountWith:token
    chatId:chatId
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.ChatsApi()
var token = token_example; // {{String}} bot's token to authorize the request
var chatId = chatId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getChatMembersCount(token, chatId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getChatMembersCountExample
    {
        public void main()
        {

            var apiInstance = new ChatsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var chatId = chatId_example;  // String | 

            try
            {
                inline_response_200_4 result = apiInstance.getChatMembersCount(token, chatId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChatsApi.getChatMembersCount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChatsApi();
$token = token_example; // String | bot's token to authorize the request
$chatId = chatId_example; // String | 

try {
    $result = $api_instance->getChatMembersCount($token, $chatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChatsApi->getChatMembersCount: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChatsApi;

my $api_instance = WWW::SwaggerClient::ChatsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $chatId = chatId_example; # String | 

eval { 
    my $result = $api_instance->getChatMembersCount(token => $token, chatId => $chatId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ChatsApi->getChatMembersCount: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChatsApi()
token = token_example # String | bot's token to authorize the request
chatId = chatId_example # String | 

try: 
    api_response = api_instance.get_chat_members_count(token, chatId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChatsApi->getChatMembersCount: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Query parameters
Name Description
chat_id*
String
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


Messages

deleteMessage

برای حذف پیامی که قبلا از طریق بازو ارسال کرده‌اید می‌توانید از این سرویس استفاده کنید


/bot{token}/deleteMessage

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/deleteMessage?chat_id=&message_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessagesApi;

import java.io.File;
import java.util.*;

public class MessagesApiExample {

    public static void main(String[] args) {
        
        MessagesApi apiInstance = new MessagesApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        Integer messageId = 56; // Integer | 
        try {
            ResponseBool result = apiInstance.deleteMessage(token, chatId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#deleteMessage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessagesApi;

public class MessagesApiExample {

    public static void main(String[] args) {
        MessagesApi apiInstance = new MessagesApi();
        String token = token_example; // String | bot's token to authorize the request
        String chatId = chatId_example; // String | 
        Integer messageId = 56; // Integer | 
        try {
            ResponseBool result = apiInstance.deleteMessage(token, chatId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#deleteMessage");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
String *chatId = chatId_example; // 
Integer *messageId = 56; // 

MessagesApi *apiInstance = [[MessagesApi alloc] init];

[apiInstance deleteMessageWith:token
    chatId:chatId
    messageId:messageId
              completionHandler: ^(ResponseBool output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.MessagesApi()
var token = token_example; // {{String}} bot's token to authorize the request
var chatId = chatId_example; // {{String}} 
var messageId = 56; // {{Integer}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteMessage(token, chatId, messageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteMessageExample
    {
        public void main()
        {

            var apiInstance = new MessagesApi();
            var token = token_example;  // String | bot's token to authorize the request
            var chatId = chatId_example;  // String | 
            var messageId = 56;  // Integer | 

            try
            {
                ResponseBool result = apiInstance.deleteMessage(token, chatId, messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessagesApi.deleteMessage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMessagesApi();
$token = token_example; // String | bot's token to authorize the request
$chatId = chatId_example; // String | 
$messageId = 56; // Integer | 

try {
    $result = $api_instance->deleteMessage($token, $chatId, $messageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->deleteMessage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MessagesApi;

my $api_instance = WWW::SwaggerClient::MessagesApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $chatId = chatId_example; # String | 
my $messageId = 56; # Integer | 

eval { 
    my $result = $api_instance->deleteMessage(token => $token, chatId => $chatId, messageId => $messageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessagesApi->deleteMessage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MessagesApi()
token = token_example # String | bot's token to authorize the request
chatId = chatId_example # String | 
messageId = 56 # Integer | 

try: 
    api_response = api_instance.delete_message(token, chatId, messageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessagesApi->deleteMessage: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Query parameters
Name Description
chat_id*
String
Required
message_id*
Integer
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


editMessageText

برای ویرایش پیام متنی که قبلا از طریق بازو ارسال کرده‌اید می‌توانید از این سرویس استفاده کنید


/bot{token}/editMessageText

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/editMessageText"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessagesApi;

import java.io.File;
import java.util.*;

public class MessagesApiExample {

    public static void main(String[] args) {
        
        MessagesApi apiInstance = new MessagesApi();
        String token = token_example; // String | bot's token to authorize the request
        EditMessageTextBody body = ; // EditMessageTextBody | 
        try {
            inline_response_200_6 result = apiInstance.editMessageText(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#editMessageText");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessagesApi;

public class MessagesApiExample {

    public static void main(String[] args) {
        MessagesApi apiInstance = new MessagesApi();
        String token = token_example; // String | bot's token to authorize the request
        EditMessageTextBody body = ; // EditMessageTextBody | 
        try {
            inline_response_200_6 result = apiInstance.editMessageText(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#editMessageText");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
EditMessageTextBody *body = ; //  (optional)

MessagesApi *apiInstance = [[MessagesApi alloc] init];

[apiInstance editMessageTextWith:token
    body:body
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.MessagesApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.editMessageText(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editMessageTextExample
    {
        public void main()
        {

            var apiInstance = new MessagesApi();
            var token = token_example;  // String | bot's token to authorize the request
            var body = new EditMessageTextBody(); // EditMessageTextBody |  (optional) 

            try
            {
                inline_response_200_6 result = apiInstance.editMessageText(token, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessagesApi.editMessageText: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMessagesApi();
$token = token_example; // String | bot's token to authorize the request
$body = ; // EditMessageTextBody | 

try {
    $result = $api_instance->editMessageText($token, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->editMessageText: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MessagesApi;

my $api_instance = WWW::SwaggerClient::MessagesApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $body = WWW::SwaggerClient::Object::EditMessageTextBody->new(); # EditMessageTextBody | 

eval { 
    my $result = $api_instance->editMessageText(token => $token, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessagesApi->editMessageText: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MessagesApi()
token = token_example # String | bot's token to authorize the request
body =  # EditMessageTextBody |  (optional)

try: 
    api_response = api_instance.edit_message_text(token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessagesApi->editMessageText: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Body parameters
Name Description
body

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


sendMessage

این سرویس برای ارسال پیام‌های متنی استفاده می‌شود


/bot{token}/sendMessage

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendMessage"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessagesApi;

import java.io.File;
import java.util.*;

public class MessagesApiExample {

    public static void main(String[] args) {
        
        MessagesApi apiInstance = new MessagesApi();
        String token = token_example; // String | bot's token to authorize the request
        SendMessageBody body = ; // SendMessageBody | 
        try {
            ResponseMessage result = apiInstance.sendMessage(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#sendMessage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessagesApi;

public class MessagesApiExample {

    public static void main(String[] args) {
        MessagesApi apiInstance = new MessagesApi();
        String token = token_example; // String | bot's token to authorize the request
        SendMessageBody body = ; // SendMessageBody | 
        try {
            ResponseMessage result = apiInstance.sendMessage(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#sendMessage");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
SendMessageBody *body = ; //  (optional)

MessagesApi *apiInstance = [[MessagesApi alloc] init];

[apiInstance sendMessageWith:token
    body:body
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.MessagesApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendMessage(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendMessageExample
    {
        public void main()
        {

            var apiInstance = new MessagesApi();
            var token = token_example;  // String | bot's token to authorize the request
            var body = new SendMessageBody(); // SendMessageBody |  (optional) 

            try
            {
                ResponseMessage result = apiInstance.sendMessage(token, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessagesApi.sendMessage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMessagesApi();
$token = token_example; // String | bot's token to authorize the request
$body = ; // SendMessageBody | 

try {
    $result = $api_instance->sendMessage($token, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->sendMessage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MessagesApi;

my $api_instance = WWW::SwaggerClient::MessagesApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $body = WWW::SwaggerClient::Object::SendMessageBody->new(); # SendMessageBody | 

eval { 
    my $result = $api_instance->sendMessage(token => $token, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessagesApi->sendMessage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MessagesApi()
token = token_example # String | bot's token to authorize the request
body =  # SendMessageBody |  (optional)

try: 
    api_response = api_instance.send_message(token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessagesApi->sendMessage: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Body parameters
Name Description
body

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


Payments

sendInvoice


/bot{token}/sendInvoice

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/sendInvoice"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentsApi;

import java.io.File;
import java.util.*;

public class PaymentsApiExample {

    public static void main(String[] args) {
        
        PaymentsApi apiInstance = new PaymentsApi();
        String token = token_example; // String | bot's token to authorize the request
        SendInvoiceBody body = ; // SendInvoiceBody | 
        try {
            ResponseMessage result = apiInstance.sendInvoice(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentsApi#sendInvoice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentsApi;

public class PaymentsApiExample {

    public static void main(String[] args) {
        PaymentsApi apiInstance = new PaymentsApi();
        String token = token_example; // String | bot's token to authorize the request
        SendInvoiceBody body = ; // SendInvoiceBody | 
        try {
            ResponseMessage result = apiInstance.sendInvoice(token, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentsApi#sendInvoice");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
SendInvoiceBody *body = ; //  (optional)

PaymentsApi *apiInstance = [[PaymentsApi alloc] init];

[apiInstance sendInvoiceWith:token
    body:body
              completionHandler: ^(ResponseMessage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.PaymentsApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendInvoice(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendInvoiceExample
    {
        public void main()
        {

            var apiInstance = new PaymentsApi();
            var token = token_example;  // String | bot's token to authorize the request
            var body = new SendInvoiceBody(); // SendInvoiceBody |  (optional) 

            try
            {
                ResponseMessage result = apiInstance.sendInvoice(token, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentsApi.sendInvoice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPaymentsApi();
$token = token_example; // String | bot's token to authorize the request
$body = ; // SendInvoiceBody | 

try {
    $result = $api_instance->sendInvoice($token, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentsApi->sendInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentsApi;

my $api_instance = WWW::SwaggerClient::PaymentsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $body = WWW::SwaggerClient::Object::SendInvoiceBody->new(); # SendInvoiceBody | 

eval { 
    my $result = $api_instance->sendInvoice(token => $token, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentsApi->sendInvoice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PaymentsApi()
token = token_example # String | bot's token to authorize the request
body =  # SendInvoiceBody |  (optional)

try: 
    api_response = api_instance.send_invoice(token, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentsApi->sendInvoice: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Body parameters
Name Description
body

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


Updates

deleteWebhook

برای حذف وب‌هوک تنظیم شده برای بازو از این سرویس استفاده میشود.


/bot{token}/deleteWebhook

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/deleteWebhook"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UpdatesApi;

import java.io.File;
import java.util.*;

public class UpdatesApiExample {

    public static void main(String[] args) {
        
        UpdatesApi apiInstance = new UpdatesApi();
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseBool result = apiInstance.deleteWebhook(token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UpdatesApi#deleteWebhook");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UpdatesApi;

public class UpdatesApiExample {

    public static void main(String[] args) {
        UpdatesApi apiInstance = new UpdatesApi();
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseBool result = apiInstance.deleteWebhook(token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UpdatesApi#deleteWebhook");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request

UpdatesApi *apiInstance = [[UpdatesApi alloc] init];

[apiInstance deleteWebhookWith:token
              completionHandler: ^(ResponseBool output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.UpdatesApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteWebhook(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteWebhookExample
    {
        public void main()
        {

            var apiInstance = new UpdatesApi();
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseBool result = apiInstance.deleteWebhook(token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UpdatesApi.deleteWebhook: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUpdatesApi();
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->deleteWebhook($token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UpdatesApi->deleteWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UpdatesApi;

my $api_instance = WWW::SwaggerClient::UpdatesApi->new();
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->deleteWebhook(token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UpdatesApi->deleteWebhook: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UpdatesApi()
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.delete_webhook(token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UpdatesApi->deleteWebhook: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required

Responses

Status: 200 - Is OK?

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


getUpdates

این سرویس برای گرفتن آپدیت‌ پیام‌های رسیده از طرف کاربر برای بازو استفاده میشود


/bot{token}/getUpdates

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/getUpdates?offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UpdatesApi;

import java.io.File;
import java.util.*;

public class UpdatesApiExample {

    public static void main(String[] args) {
        
        UpdatesApi apiInstance = new UpdatesApi();
        String token = token_example; // String | bot's token to authorize the request
        GetUpdatesBody body = ; // GetUpdatesBody | 
        Integer offset = 56; // Integer | 
        try {
            ResponseUpdate result = apiInstance.getUpdates(token, body, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UpdatesApi#getUpdates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UpdatesApi;

public class UpdatesApiExample {

    public static void main(String[] args) {
        UpdatesApi apiInstance = new UpdatesApi();
        String token = token_example; // String | bot's token to authorize the request
        GetUpdatesBody body = ; // GetUpdatesBody | 
        Integer offset = 56; // Integer | 
        try {
            ResponseUpdate result = apiInstance.getUpdates(token, body, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UpdatesApi#getUpdates");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request
GetUpdatesBody *body = ; //  (optional)
Integer *offset = 56; //  (optional)

UpdatesApi *apiInstance = [[UpdatesApi alloc] init];

[apiInstance getUpdatesWith:token
    body:body
    offset:offset
              completionHandler: ^(ResponseUpdate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.UpdatesApi()
var token = token_example; // {{String}} bot's token to authorize the request
var opts = { 
  'body':  // {{GetUpdatesBody}} 
  'offset': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUpdates(token, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUpdatesExample
    {
        public void main()
        {

            var apiInstance = new UpdatesApi();
            var token = token_example;  // String | bot's token to authorize the request
            var body = new GetUpdatesBody(); // GetUpdatesBody |  (optional) 
            var offset = 56;  // Integer |  (optional) 

            try
            {
                ResponseUpdate result = apiInstance.getUpdates(token, body, offset);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UpdatesApi.getUpdates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUpdatesApi();
$token = token_example; // String | bot's token to authorize the request
$body = ; // GetUpdatesBody | 
$offset = 56; // Integer | 

try {
    $result = $api_instance->getUpdates($token, $body, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UpdatesApi->getUpdates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UpdatesApi;

my $api_instance = WWW::SwaggerClient::UpdatesApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $body = WWW::SwaggerClient::Object::GetUpdatesBody->new(); # GetUpdatesBody | 
my $offset = 56; # Integer | 

eval { 
    my $result = $api_instance->getUpdates(token => $token, body => $body, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UpdatesApi->getUpdates: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UpdatesApi()
token = token_example # String | bot's token to authorize the request
body =  # GetUpdatesBody |  (optional)
offset = 56 # Integer |  (optional)

try: 
    api_response = api_instance.get_updates(token, body=body, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UpdatesApi->getUpdates: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Body parameters
Name Description
body
Query parameters
Name Description
offset
Integer

Responses

Status: 200 - An array of Updates

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


setWebhook

برای تنظیم وب‌هوک و دریافت آپدیت‌ پیام های رسیده از طرف کاربر از طریق http از این سرویس استفاده می‌شود.


/bot{token}/setWebhook

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bale/bot{token}/setWebhook"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UpdatesApi;

import java.io.File;
import java.util.*;

public class UpdatesApiExample {

    public static void main(String[] args) {
        
        UpdatesApi apiInstance = new UpdatesApi();
        String url = url_example; // String | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseBool result = apiInstance.setWebhook(url, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UpdatesApi#setWebhook");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UpdatesApi;

public class UpdatesApiExample {

    public static void main(String[] args) {
        UpdatesApi apiInstance = new UpdatesApi();
        String url = url_example; // String | 
        String token = token_example; // String | bot's token to authorize the request
        try {
            ResponseBool result = apiInstance.setWebhook(url, token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UpdatesApi#setWebhook");
            e.printStackTrace();
        }
    }
}
String *url = url_example; // 
String *token = token_example; // bot's token to authorize the request

UpdatesApi *apiInstance = [[UpdatesApi alloc] init];

[apiInstance setWebhookWith:url
    token:token
              completionHandler: ^(ResponseBool output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.UpdatesApi()
var url = url_example; // {{String}} 
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.setWebhook(urltoken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class setWebhookExample
    {
        public void main()
        {

            var apiInstance = new UpdatesApi();
            var url = url_example;  // String | 
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                ResponseBool result = apiInstance.setWebhook(url, token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UpdatesApi.setWebhook: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUpdatesApi();
$url = url_example; // String | 
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->setWebhook($url, $token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UpdatesApi->setWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UpdatesApi;

my $api_instance = WWW::SwaggerClient::UpdatesApi->new();
my $url = url_example; # String | 
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->setWebhook(url => $url, token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UpdatesApi->setWebhook: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UpdatesApi()
url = url_example # String | 
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.set_webhook(url, token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UpdatesApi->setWebhook: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required
Form parameters
Name Description
url*
String
Required

Responses

Status: 200 - Is OK?

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal


Users

getMe

از طریق این سرویس می‌توانید اطلاعات پایه‌ای بازو را بدست بیاورید فقط با داشتن توکن بازو


/bot{token}/getMe

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/bale/bot{token}/getMe"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String token = token_example; // String | bot's token to authorize the request
        try {
            inline_response_200 result = apiInstance.getMe(token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getMe");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String token = token_example; // String | bot's token to authorize the request
        try {
            inline_response_200 result = apiInstance.getMe(token);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getMe");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // bot's token to authorize the request

UsersApi *apiInstance = [[UsersApi alloc] init];

[apiInstance getMeWith:token
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BaleBotApi = require('bale_bot_api');

var api = new BaleBotApi.UsersApi()
var token = token_example; // {{String}} bot's token to authorize the request

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMe(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMeExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();
            var token = token_example;  // String | bot's token to authorize the request

            try
            {
                inline_response_200 result = apiInstance.getMe(token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getMe: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$token = token_example; // String | bot's token to authorize the request

try {
    $result = $api_instance->getMe($token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getMe: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $token = token_example; # String | bot's token to authorize the request

eval { 
    my $result = $api_instance->getMe(token => $token);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getMe: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
token = token_example # String | bot's token to authorize the request

try: 
    api_response = api_instance.get_me(token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getMe: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
bot's token to authorize the request
Required

Responses

Status: 200 -

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 420 - Flood

Status: 500 - Internal