Skip to main content
GET
/
profile
cURL
curl --request GET \
  --url https://api.openformat.tech/v1/profile \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.openformat.tech/v1/profile"

headers = {"X-API-KEY": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.openformat.tech/v1/profile', 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.openformat.tech/v1/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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.openformat.tech/v1/profile"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-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.openformat.tech/v1/profile")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.openformat.tech/v1/profile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "user_id": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
  "xp_balance": "10",
  "collected_badges": [
    {
      "id": "0x073bacb2b25973aecfb718e47fc92cccdd895dcc",
      "name": "ACCESS_KEY",
      "metadataURI": null,
      "metadata": null
    },
    {
      "id": "0x30216dd54591950d175f14b84eee95620000c38f",
      "name": "Novice Forager",
      "metadataURI": "ipfs://TokenURI",
      "metadata": null
    }
  ],
  "completed_actions": [
    {
      "name": "collected berry",
      "createdAt": "1728053671",
      "xp_rewarded": "1"
    }
  ],
  "credit_balances": [
    {
      "token_id": "0x645065e4e95be7c4a94d57c00d4bbe8e79efc47f",
      "token_name": "My Credit Token",
      "token_balance": "9999999999999999999",
      "token_balance_formatted": "9.999999999999999999",
      "token_symbol": "MCT",
      "token_decimals": 18
    }
  ]
}
{
  "user_id": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
  "xp_balance": "10",
  "collected_badges": [
    {
      "id": "0x073bacb2b25973aecfb718e47fc92cccdd895dcc",
      "name": "ACCESS_KEY",
      "metadataURI": null,
      "metadata": null
    },
    {
      "id": "0x30216dd54591950d175f14b84eee95620000c38f",
      "name": "Novice Forager",
      "metadataURI": "ipfs://TokenURI",
      "metadata": null
    }
  ],
  "completed_actions": [
    {
      "name": "collected berry",
      "createdAt": "1728053671",
      "xp_rewarded": "1"
    }
  ],
  "credit_balances": [
    {
      "token_id": "0x645065e4e95be7c4a94d57c00d4bbe8e79efc47f",
      "token_name": "My Credit Token",
      "token_balance": "9999999999999999999",
      "token_balance_formatted": "9.999999999999999999",
      "token_symbol": "MCT",
      "token_decimals": 18
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

chain
string
required

Blockchain network to use

Required string length: 1 - 255
Example:

"arbitrum-sepolia"

user_id
string

Ethereum address of the user we are insterested, if not present then the address of the logged user will be used

Pattern: ^(0x)?[0-9a-fA-F]{40}$
Example:

"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"

app_id
string

Ethereum addres of the application we are interested, if not present then results will not contain token balances

Pattern: ^(0x)?[0-9a-fA-F]{40}$
Example:

"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a"

Response

Displays the on-chain profile for a user

User profile

user_id
string
required
Pattern: ^(0x)?[0-9a-fA-F]{40}$
xp_balance
string
required

XP token balabce

Example:

"123"

collected_badges
object[]
required

List of badges received by this user

completed_actions
object[]
required

List of actions completed by this user