PATCH
https://api.cryptohopper.com/v1/social/profile/{id}
Updates the name, alias, bio, location and links of your own social profile and returns the updated profile. Fields you leave out keep their current value; an empty value clears the field.
OAuth scope:
manage About scopes
Other accepted fields: facebook, telegram and tradingview. name and alias are limited to 120 characters, description and location to 255. The alias may only contain lowercase letters, numbers and hyphens, must be longer than 2 characters, cannot be fully numeric and cannot be removed once set. Text with profanity is rejected. A taken alias returns 409.
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/social/profile/PROFILE_ID" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Trader Jane","alias":"trader-jane","description":"Swing trader, mostly BTC and ETH.","location":"Amsterdam","twitter":"trader_jane"}'
const response = await fetch('https://api.cryptohopper.com/v1/social/profile/PROFILE_ID', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Trader Jane",
"alias": "trader-jane",
"description": "Swing trader, mostly BTC and ETH.",
"location": "Amsterdam",
"twitter": "trader_jane"
})
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/social/profile/PROFILE_ID",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"name": "Trader Jane",
"alias": "trader-jane",
"description": "Swing trader, mostly BTC and ETH.",
"location": "Amsterdam",
"twitter": "trader_jane"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/social/profile/PROFILE_ID');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Trader Jane',
'alias' => 'trader-jane',
'description' => 'Swing trader, mostly BTC and ETH.',
'location' => 'Amsterdam',
'twitter' => 'trader_jane',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Required | Not used: this endpoint always updates the profile of the authenticated user. |
Response
{
"data": {
"profile_id": "4567",
"profile_name": "Trader Jane",
"profile_alias": "trader-jane",
"location": "Amsterdam",
"biography": "Swing trader, mostly BTC and ETH.",
"profile_image": "https://cdn.example.com/images/social/uploads/avatar_4567.jpg",
"feature_image": "https://cdn.example.com/images/social/uploads/feature_4567.jpg",
"verified": "0",
"show_badges": "0",
"profile_link": "/social/profile/trader-jane",
"social_links": {
"twitter": "trader_jane",
"telegram": "trader_jane"
},
"tournaments": {
"rank": "1520",
"score": "340",
"tournaments_played": "6",
"tournaments_won": "0"
},
"following": 0,
"member_since": "2021-03-14 09:12:44",
"total_following": "25",
"total_followers": "112",
"blocked_by_user": 0,
"pinned_post": null,
"badges": null
}
}