User telegram login
curl --request POST \
--url https://api.paylora.org/api/v1/auth/telegram \
--header 'Content-Type: application/json' \
--data '
{
"auth_date": 1762417564,
"first_name": "Jhon",
"hash": "679c7c5844ds",
"id": 1721678137,
"photo_url": "https://t.me/i/userpic/320/example.jpg",
"username": "username_example"
}
'import requests
url = "https://api.paylora.org/api/v1/auth/telegram"
payload = {
"auth_date": 1762417564,
"first_name": "Jhon",
"hash": "679c7c5844ds",
"id": 1721678137,
"photo_url": "https://t.me/i/userpic/320/example.jpg",
"username": "username_example"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
auth_date: 1762417564,
first_name: 'Jhon',
hash: '679c7c5844ds',
id: 1721678137,
photo_url: 'https://t.me/i/userpic/320/example.jpg',
username: 'username_example'
})
};
fetch('https://api.paylora.org/api/v1/auth/telegram', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paylora.org/api/v1/auth/telegram",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auth_date' => 1762417564,
'first_name' => 'Jhon',
'hash' => '679c7c5844ds',
'id' => 1721678137,
'photo_url' => 'https://t.me/i/userpic/320/example.jpg',
'username' => 'username_example'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paylora.org/api/v1/auth/telegram"
payload := strings.NewReader("{\n \"auth_date\": 1762417564,\n \"first_name\": \"Jhon\",\n \"hash\": \"679c7c5844ds\",\n \"id\": 1721678137,\n \"photo_url\": \"https://t.me/i/userpic/320/example.jpg\",\n \"username\": \"username_example\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paylora.org/api/v1/auth/telegram")
.header("Content-Type", "application/json")
.body("{\n \"auth_date\": 1762417564,\n \"first_name\": \"Jhon\",\n \"hash\": \"679c7c5844ds\",\n \"id\": 1721678137,\n \"photo_url\": \"https://t.me/i/userpic/320/example.jpg\",\n \"username\": \"username_example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paylora.org/api/v1/auth/telegram")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth_date\": 1762417564,\n \"first_name\": \"Jhon\",\n \"hash\": \"679c7c5844ds\",\n \"id\": 1721678137,\n \"photo_url\": \"https://t.me/i/userpic/320/example.jpg\",\n \"username\": \"username_example\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"access": ""
}
}{
"statusCode": 400,
"message": [
"[value] is not valid"
]
}{
"statusCode": 401,
"message": "Invalid signature | jwt must be provided"
}{
"statusCode": 403,
"message": "Only [admin, customer] has access"
}{
"statusCode": 404,
"message": "Resource Not Found"
}{
"statusCode": 409,
"message": "Resource with unique value (email, name etc) already exist"
}{
"statusCode": 429,
"message": "Too Many Requests"
}{
"statusCode": 500,
"message": "Sever error message"
}Auth
User telegram login
Api for telegram login
POST
/
api
/
v1
/
auth
/
telegram
User telegram login
curl --request POST \
--url https://api.paylora.org/api/v1/auth/telegram \
--header 'Content-Type: application/json' \
--data '
{
"auth_date": 1762417564,
"first_name": "Jhon",
"hash": "679c7c5844ds",
"id": 1721678137,
"photo_url": "https://t.me/i/userpic/320/example.jpg",
"username": "username_example"
}
'import requests
url = "https://api.paylora.org/api/v1/auth/telegram"
payload = {
"auth_date": 1762417564,
"first_name": "Jhon",
"hash": "679c7c5844ds",
"id": 1721678137,
"photo_url": "https://t.me/i/userpic/320/example.jpg",
"username": "username_example"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
auth_date: 1762417564,
first_name: 'Jhon',
hash: '679c7c5844ds',
id: 1721678137,
photo_url: 'https://t.me/i/userpic/320/example.jpg',
username: 'username_example'
})
};
fetch('https://api.paylora.org/api/v1/auth/telegram', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paylora.org/api/v1/auth/telegram",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auth_date' => 1762417564,
'first_name' => 'Jhon',
'hash' => '679c7c5844ds',
'id' => 1721678137,
'photo_url' => 'https://t.me/i/userpic/320/example.jpg',
'username' => 'username_example'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paylora.org/api/v1/auth/telegram"
payload := strings.NewReader("{\n \"auth_date\": 1762417564,\n \"first_name\": \"Jhon\",\n \"hash\": \"679c7c5844ds\",\n \"id\": 1721678137,\n \"photo_url\": \"https://t.me/i/userpic/320/example.jpg\",\n \"username\": \"username_example\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paylora.org/api/v1/auth/telegram")
.header("Content-Type", "application/json")
.body("{\n \"auth_date\": 1762417564,\n \"first_name\": \"Jhon\",\n \"hash\": \"679c7c5844ds\",\n \"id\": 1721678137,\n \"photo_url\": \"https://t.me/i/userpic/320/example.jpg\",\n \"username\": \"username_example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paylora.org/api/v1/auth/telegram")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth_date\": 1762417564,\n \"first_name\": \"Jhon\",\n \"hash\": \"679c7c5844ds\",\n \"id\": 1721678137,\n \"photo_url\": \"https://t.me/i/userpic/320/example.jpg\",\n \"username\": \"username_example\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"access": ""
}
}{
"statusCode": 400,
"message": [
"[value] is not valid"
]
}{
"statusCode": 401,
"message": "Invalid signature | jwt must be provided"
}{
"statusCode": 403,
"message": "Only [admin, customer] has access"
}{
"statusCode": 404,
"message": "Resource Not Found"
}{
"statusCode": 409,
"message": "Resource with unique value (email, name etc) already exist"
}{
"statusCode": 429,
"message": "Too Many Requests"
}{
"statusCode": 500,
"message": "Sever error message"
}Body
application/json
Telegram authentication date
Example:
1762417564
User first name
Example:
"Jhon"
Authentication hash
Example:
"679c7c5844ds"
Telegram user ID
Example:
1721678137
User profile photo URL
Example:
"https://t.me/i/userpic/320/example.jpg"
Telegram username
Example:
"username_example"
Response
User`s logined via telegram
⌘I

