Get profile
curl --request GET \
--url https://api.offlineprotocol.com/api/v1/profiles/{username} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.offlineprotocol.com/api/v1/profiles/{username}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.offlineprotocol.com/api/v1/profiles/{username}', 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.offlineprotocol.com/api/v1/profiles/{username}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.offlineprotocol.com/api/v1/profiles/{username}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.offlineprotocol.com/api/v1/profiles/{username}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offlineprotocol.com/api/v1/profiles/{username}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"profile": {
"username": "<string>",
"userId": 123,
"hidden": true,
"status": "<string>",
"about": "<string>",
"pfp": "<string>",
"pfpUnavailable": true,
"pfpPrivacy": "EVERYONE",
"socials": {
"x": "<string>",
"discord": "<string>",
"telegram": "<string>",
"website": "<string>"
},
"location": {
"lat": 123,
"lng": 123
},
"referral": "<string>",
"years": 123,
"streak": 123,
"connectionCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"address": "<string>"
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}Profiles
Get profile
Fetch an OfflineID profile by username. Only the owner receives the exact location; other callers receive location: null.
GET
/
profiles
/
{username}
Get profile
curl --request GET \
--url https://api.offlineprotocol.com/api/v1/profiles/{username} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.offlineprotocol.com/api/v1/profiles/{username}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.offlineprotocol.com/api/v1/profiles/{username}', 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.offlineprotocol.com/api/v1/profiles/{username}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.offlineprotocol.com/api/v1/profiles/{username}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.offlineprotocol.com/api/v1/profiles/{username}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.offlineprotocol.com/api/v1/profiles/{username}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"profile": {
"username": "<string>",
"userId": 123,
"hidden": true,
"status": "<string>",
"about": "<string>",
"pfp": "<string>",
"pfpUnavailable": true,
"pfpPrivacy": "EVERYONE",
"socials": {
"x": "<string>",
"discord": "<string>",
"telegram": "<string>",
"website": "<string>"
},
"location": {
"lat": 123,
"lng": 123
},
"referral": "<string>",
"years": 123,
"streak": 123,
"connectionCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"address": "<string>"
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}{
"message": "<string>",
"data": {},
"error": {
"message": "<string>",
"code": "<string>",
"retryAfter": 123,
"currentHourCount": 123,
"limit": 123
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Public application ID (app_...). Send on application requests for attribution and product controls. Not an API secret.

