Update authenticated user profile
curl --request PATCH \
--url https://api-421614.alphagrid.capital/users/me \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'privy-id-token: <privy-id-token>' \
--data '
{
"displayName": "<string>"
}
'import requests
url = "https://api-421614.alphagrid.capital/users/me"
payload = { "displayName": "<string>" }
headers = {
"Authorization": "<authorization>",
"privy-id-token": "<privy-id-token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'privy-id-token': '<privy-id-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({displayName: '<string>'})
};
fetch('https://api-421614.alphagrid.capital/users/me', 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-421614.alphagrid.capital/users/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"privy-id-token: <privy-id-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-421614.alphagrid.capital/users/me"
payload := strings.NewReader("{\n \"displayName\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("privy-id-token", "<privy-id-token>")
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.patch("https://api-421614.alphagrid.capital/users/me")
.header("Authorization", "<authorization>")
.header("privy-id-token", "<privy-id-token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-421614.alphagrid.capital/users/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["privy-id-token"] = '<privy-id-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"displayName": "<string>",
"email": "jsmith@example.com",
"preferredCurrency": "USD",
"registeredAt": "2023-11-07T05:31:56Z",
"lastLoginAt": "2023-11-07T05:31:56Z",
"address": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Users
Update authenticated user profile
Updates display name and/or preferred currency for the authenticated wallet.
PATCH
/
users
/
me
Update authenticated user profile
curl --request PATCH \
--url https://api-421614.alphagrid.capital/users/me \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'privy-id-token: <privy-id-token>' \
--data '
{
"displayName": "<string>"
}
'import requests
url = "https://api-421614.alphagrid.capital/users/me"
payload = { "displayName": "<string>" }
headers = {
"Authorization": "<authorization>",
"privy-id-token": "<privy-id-token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'privy-id-token': '<privy-id-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({displayName: '<string>'})
};
fetch('https://api-421614.alphagrid.capital/users/me', 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-421614.alphagrid.capital/users/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"privy-id-token: <privy-id-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-421614.alphagrid.capital/users/me"
payload := strings.NewReader("{\n \"displayName\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("privy-id-token", "<privy-id-token>")
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.patch("https://api-421614.alphagrid.capital/users/me")
.header("Authorization", "<authorization>")
.header("privy-id-token", "<privy-id-token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-421614.alphagrid.capital/users/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["privy-id-token"] = '<privy-id-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"displayName": "<string>",
"email": "jsmith@example.com",
"preferredCurrency": "USD",
"registeredAt": "2023-11-07T05:31:56Z",
"lastLoginAt": "2023-11-07T05:31:56Z",
"address": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Headers
Body
application/json
Response
Updated user profile