cURL
curl --request GET \
--url https://api.b-bot.space/api/v1/get_user \
--header 'bbot-api-key: <api-key>'import requests
url = "https://api.b-bot.space/api/v1/get_user"
headers = {"bbot-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'bbot-api-key': '<api-key>'}};
fetch('https://api.b-bot.space/api/v1/get_user', 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.b-bot.space/api/v1/get_user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"bbot-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.b-bot.space/api/v1/get_user"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("bbot-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.b-bot.space/api/v1/get_user")
.header("bbot-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.b-bot.space/api/v1/get_user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["bbot-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"user": {
"user_id": "google-oauth2|123456789012345678901",
"email": "example.user@gmail.com",
"given_name": "John",
"email_verified": true,
"updated_at": "2024-07-28T18:16:33.568Z",
"identities": [
{
"access_token": "ya29.a0AXyoCgtJQY6FVBiPDTJq...",
"expires_in": 3599,
"connection": "google-oauth2",
"user_id": "123456789012345678901",
"provider": "google-oauth2",
"isSocial": true
}
],
"created_at": "2024-03-18T17:08:05.432Z",
"user_metadata": {
"message_me": false,
"newsletter": false,
"api_keys": [
"bbot_abcdefghij1234567890"
],
"updates": false,
"features": true,
"apps": {},
"tokens": 500,
"follows_me": true,
"mentions_me": true
},
"name": "John Doe",
"nickname": "john.doe",
"picture": "https://lh3.googleusercontent.com/a/ACg8ocL54DkmYmCmnGDiKfGJ2zv...",
"family_name": "Doe",
"last_login": "2024-07-28T18:16:16.163Z",
"last_ip": "192.168.1.1",
"logins_count": 125,
"app_metadata": {}
}
}
]{
"error": 123,
"message": "<string>"
}Get User
This endpoint retrieves detailed information about the authenticated user. It provides various details including the user’s email, name, associated identities, metadata, and more.
GET
/
api
/
v1
/
get_user
cURL
curl --request GET \
--url https://api.b-bot.space/api/v1/get_user \
--header 'bbot-api-key: <api-key>'import requests
url = "https://api.b-bot.space/api/v1/get_user"
headers = {"bbot-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'bbot-api-key': '<api-key>'}};
fetch('https://api.b-bot.space/api/v1/get_user', 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.b-bot.space/api/v1/get_user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"bbot-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.b-bot.space/api/v1/get_user"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("bbot-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.b-bot.space/api/v1/get_user")
.header("bbot-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.b-bot.space/api/v1/get_user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["bbot-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"user": {
"user_id": "google-oauth2|123456789012345678901",
"email": "example.user@gmail.com",
"given_name": "John",
"email_verified": true,
"updated_at": "2024-07-28T18:16:33.568Z",
"identities": [
{
"access_token": "ya29.a0AXyoCgtJQY6FVBiPDTJq...",
"expires_in": 3599,
"connection": "google-oauth2",
"user_id": "123456789012345678901",
"provider": "google-oauth2",
"isSocial": true
}
],
"created_at": "2024-03-18T17:08:05.432Z",
"user_metadata": {
"message_me": false,
"newsletter": false,
"api_keys": [
"bbot_abcdefghij1234567890"
],
"updates": false,
"features": true,
"apps": {},
"tokens": 500,
"follows_me": true,
"mentions_me": true
},
"name": "John Doe",
"nickname": "john.doe",
"picture": "https://lh3.googleusercontent.com/a/ACg8ocL54DkmYmCmnGDiKfGJ2zv...",
"family_name": "Doe",
"last_login": "2024-07-28T18:16:16.163Z",
"last_ip": "192.168.1.1",
"logins_count": 125,
"app_metadata": {}
}
}
]{
"error": 123,
"message": "<string>"
}The response provides comprehensive information about the authenticated user.
The timestamps are in ISO 8601 format.
The
identities array contains details about the user’s authentication
identities, including access tokens and their expiration.The
user_metadata and app_metadata objects can include various custom data
associated with the user.