Skip to main content
GET
/
client
/
user
/
attributes
Get User Attributes
curl --request GET \
  --url https://api.doshi.app/client/user/attributes \
  --header 'Access-Type: <access-type>' \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.doshi.app/client/user/attributes"

headers = {
    "Access-Type": "<access-type>",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
const options = {
  method: 'GET',
  headers: {'Access-Type': '<access-type>', Authorization: 'Bearer <token>'}
};

fetch('https://api.doshi.app/client/user/attributes', 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.doshi.app/client/user/attributes",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Access-Type: <access-type>",
    "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.doshi.app/client/user/attributes"

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

	req.Header.Add("Access-Type", "<access-type>")
	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.doshi.app/client/user/attributes")
  .header("Access-Type", "<access-type>")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.doshi.app/client/user/attributes")

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

request = Net::HTTP::Get.new(url)
request["Access-Type"] = '<access-type>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "attributes": [
    {
      "id": "<string>",
      "userId": "<string>",
      "attributes": {},
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "total": 123
}
{
  "code": "<string>",
  "message": "<string>",
  "details": {}
}

Authorizations

Authorization
string
header
required

Authentication token (API Key) provided by Doshi. Your server's IP address must be whitelisted to use this API. Contact hello@doshi.app to whitelist your IPs.

Headers

Access-Type
enum<string>
required

Must be set to 'client' for all API requests

Available options:
client

Query Parameters

userId
string

Filter by user ID

page
integer
default:1

Page number for pagination

pageSize
integer
default:10000

Number of results per page (max 10000)

Response

A list of user attributes.

attributes
object[]
required
total
integer
required