# Create User Secret

NOTE

You must have a PIN to generate a User Secret. You can create the User Secret PIN using the create_user_secret_pin endpoint.

This endpoint creates a User Secret for a given account. A User Secret is a 64 characters long unique string of numbers and letters. A User Secret is associated with a specific user - the user for whom the User Secret is created.

IMPORTANT NOTE

The User Secret is displayed only once. It is not stored in the system, and it cannot be retrieved. Keep your User Secret stored in a secure place. If you lose your User Secret, you will need to start the User Secret generation process from the beginning.

Method Path Operation*
POST /secrets/{account}/{pin} create_user_secret

*

The operation "create_user_secret" is available to all users. It does not require any authentication.

# Request

Parameter Type In Description
{account}
required
string path Account UUID.
{pin}
required
string path User Secret PIN. You can create the User Secret PIN using the create_user_secret_pin endpoint.

In our example, user B (user UUID "333b4bf7-43b6-4df1-927a-9ddbd7336144") sends a request to generate a User Secret. They include the account UUID and the User Secret PIN in the path of the request.

# Response

Attribute Type Description
secret string User Secret. A 64 characters long unique string of numbers and letters associated with the user for whom the User Secret is created.
account string Account UUID.
user string User UUID of the user for whom the User Secret was created.
validity_ts timestamp Time at which the User Secret expires. Defined at the time of creation of the User Secret PIN. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window). If the value is null, the User Secret does not expire.
created_ts timestamp Time at which the User Secret was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
updated_ts timestamp Time at which the User Secret was last updated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.

Was this article helpful?