Register a new user on the BLOCKv platform.
Content-Type: application/json
App-Id: {app_id}
Name | Type | Description |
---|---|---|
first_name | string | The user's first name. Max. length 64 characters. |
last_name | string | The user's last name. Max. length 64 characters. |
name_public | boolean | Flag to indicate if other users can see the user's first and last name. Default:
true |
password | string | The password that the user uses to login. Only mandatory if one of the tokens uses the password for authentication. Max. length 64 characters. |
avatar_public | boolean | Flag to indicate if other users can see the user's avatar. Default:
true |
birthday | string | The user's birth date. Format:
YYYY-MM-DD |
language | string | The user's preferred language. Two letter language code according to ISO 639-1. |
[
user_tokens
]
*
| array | A list of user tokens to identify the user. At least one token is needed to register a user. |
en
ru
es
{
"first_name" : "John",
"last_name" : "Doe",
"name_public": true,
"password": "secret",
"avatar_public": true,
"birthday": "1970-01-01",
"language": "en",
"user_tokens" : [
{
"token" : "john.doe@example.com",
"token_type" : "email"
},
{
"token": "+11234567890",
"token_type": "phone_number"
}
]
}
Error | Type | Description |
---|---|---|
200 | http | Everything is OK |
400 | http | Bad Request |
409 | http | One of the tokens is already in use |
Name | Type | Description |
---|---|---|
user | object | The user object that was created. |
[
asset_provider
] | array | An array of
asset_provider
objects. |
access_token | string | A JWT access token according to RFC 7519, which will be valid for 5 minutes. |
refresh_token | string | A refresh token to get a new access token. |
{
"payload": {
"user": {
"id": "001d0933-88e6-4e17-b147-0f672dc016d1",
"meta": {
"data_type": "blockv::user",
"when_created": "2018-01-01T00:00:00+00:00",
"when_modified": "2018-01-01T00:00:00+00:00"
},
"properties": {
"first_name": "John",
"last_name": "Doe",
"name_public": true,
"avatar_public": true,
"birthday": "1970-01-01",
"nonpush_notification": false,
"language": "en"
},
"system_properties": {
"pub_fqdn": "publisher_fqdn",
"is_admin": false,
"activated": false,
"last_login": "",
"is_merchant": false,
}
},
"asset_provider": [
{
"name": "blockv",
"type": "Cloudfront",
"descriptor": {
"CloudFrontPolicy": "eyJTdGF0ZW1lbnQi...",
"CloudFronSignature": "HEroZOBNqC4ld...",
"CloudFrontKeyPairId": "APKAIB7W534.."
}
}
],
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
"refresh_token": "APHpa3JD9XwQ2DqISfq8YtnVPQUn..."
}
}