User Data Set
Securely store or upload data using key/value approach
User Data Set allows services to securely store or upload data on behalf of users using key/value approach.
To make use of the User Data Set feature, services need to send a POST request to the HyperID API. This request requires the 'user-data-set' scope, which must be explicitly granted by the user during the authorization process. This scope authorizes the service to store data on behalf of the user.
POST /user-data/set HTTP/1.1
Host: api.hypersecureid.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImFjZDc0NGMzLWFlZDMtNGQxMC04ODZhLTcyYjU0MGY4NmU5YSJ9.eyJleHAiOjE2Nzk4MjM1NTEsImlhdCI6MTY3OTgxOTk1MSwiYXV0aF90aW1lIjoxNjc5ODE5OTUxLCJqdGkiOiIzM2ZlNzI2Ni1kOTY2LTRlNDgtYjU2My05ZWNhZTdjMWU3NTEiLCJpc3MiOiJodHRwczovL2xvZ2luLmh5cGVyc2VjdXJlaWQuY29tL2F1dGgvcmVhbG1zL0h5cGVySUQiLCJzdWIiOiI5MTZlMGUyZS00NmQ5LTRiODAtODg1Ni1kZDlmZWRiMWI3MjMiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJjbGllbnQtc2VydmljZS1hcHAiLCJzY29wZSI6Im9wZW5pZCBlbWFpbCBrZXlzIGF1dGgiLCJzaWQiOiI5OTVjNzhhZC1lYmFjLTRhYWYtOTdiZC0xOTQ4ZWMxOWQzNzEiLCJ3YWxsZXRfYWRkcmVzcyI6IjB44oCmIiwid2FsbGV0X2NoYWluX2lkIjoiMSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJlbWFpbCI6InVzZXJAZ21haWwuY29tIn0.h9GusuxDPX8VOjPoZHD73XzktOkVtd1qEz6C8AuBybw
Content-Length: 70
{
"value_key": "user-data-key",
"value_data": "user-data"
}The authorization header should include a valid and non-expired bearer (access) token.
The request content should include a user's data key (value_key field), which serves as a unique identifier for the stored data, and the actual user data (value_data field). Both fields have string-type values.
HyperID notifies your application with the next response about the data set result:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": 0
}The result field is an integer representation of data set result, with various possible values as listed in the table below:
0
Success
-1
Failure due to an invalid token
-2
Failure due to an expired token
-3
Failure due to access denial
-4
Failure because the service is temporarily unavailable
-5
Failure due to invalid request parameters
Below, you can find examples of 'User Data Set' request implemented:
Last updated