GET
https://api.cryptohopper.com/v1/user
Returns the profile of the user who authorized the app: name, username, email, address details, whether two-factor authentication is on and whether the user is on a trial.
OAuth scope:
user About scopes
name is HTML-entity encoded. Other stored profile fields, if any, are returned as extra keys. userHash is the identity-verification hash the Cryptohopper apps use for the Intercom support chat. Calling this endpoint also updates the user's last visit date.
Example request
curl "https://api.cryptohopper.com/v1/user" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/user', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/user",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Response
{
"data": {
"address1": "Main Street 1",
"address2": "",
"city": "Amsterdam",
"country": "",
"country_nationality": "",
"phone": "+31600000000",
"postal_code": "1000 AA",
"region": "",
"website": "",
"id": "123456",
"name": "Jane Doe",
"username": "janedoe",
"email": "[email protected]",
"enabled_2fa": true,
"is_trial_user": "0",
"userHash": "3f1c9a7e2b8d4c6f0a5e9b1d7c3f8a2e6b4d0c9f1a7e3b5d8c2f6a0e4b9d1c7f"
}
}
| Field | Type | Description |
|---|---|---|
name | string | |
username | string | |
email | string | |
address1 | string | |
address2 | string | |
city | string | |
region | string | |
country | string | |
postal_code | string | |
phone | string | |
website | string |