POST
https://api.cryptohopper.com/v1/user/register
Creates a new Cryptohopper account. The fields are read from the request headers listed below or from a JSON body. Needs no access token.
Only works from Cryptohopper's own apps: the User-Agent header must hold the username encrypted with a platform key, and failed checks count toward an IP block. With DeviceId and Platform ios or android the response also contains access_token.
Example request
curl -X POST "https://api.cryptohopper.com/v1/user/register" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "name: NAME" \
-H "password: PASSWORD" \
-H "email: EMAIL" \
-H "username: USERNAME"
const response = await fetch('https://api.cryptohopper.com/v1/user/register', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"name": "NAME",
"password": "PASSWORD",
"email": "EMAIL",
"username": "USERNAME"
}
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/user/register",
headers={
"access-token": "YOUR_ACCESS_TOKEN",
"name": "NAME",
"password": "PASSWORD",
"email": "EMAIL",
"username": "USERNAME"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user/register');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'name: NAME',
'password: PASSWORD',
'email: EMAIL',
'username: USERNAME',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
subscribe |
string | Optional | Any non-empty value subscribes the user to the newsletter. Alias of subscribe_newsletter. |
name |
string | Required | Full name, 3 to 255 characters. |
subscribe-newsletter |
string | Optional | Any non-empty value subscribes the user to the newsletter. Alias of subscribe_newsletter. |
password |
string | Required | Password; must meet the Cryptohopper password policy. |
email |
string | Required | Email address of the new account. |
username |
string | Required | Username, 3 to 255 characters. |
subscribe_newsletter |
string | Optional | Any non-empty value subscribes the user to the newsletter. |
Platform |
string | Optional | Platform of the client: web, ios or android. Required. |
Response
{
"data": {
"user_id": "123456",
"message": "New user created.",
"user_activation_needed": "1",
"secret": "U2FsdGVkX1%2BexampleSecret"
}
}