Creating your first user
Create a user in Vital
Once you have your API Keys you are ready to create your first user!
Almost all API requests will interact with a user. To allow a user to connect to the API, first create a user_id
using the /user/
endpoint. A user_id
is the unique key we use to lookup users in our database. This should be a unique ID generated from your application - upon user sign up.
Personally identifiable information (PII), such as an email address or phone number, should not be used as input for the
user_id
parameter.
Parameters:
client_user_id
string
A unique identifier used to lookup a user.
from vital import Client
client = Client(
client_id,
client_secret,
environment="sandbox"
)
client_user_id = "ysad21321-..."
user_id = client.UserKey.create(client_user_id)
const { VitalClient } = require("Vital");
const client = new VitalClient({
client_id: <CLIENT_ID>,
client_secret: <CLIENT_SECRET>,
environment: "sandbox",
});
const resp = await client.User.create(client_user_id)
# Please see Authentication page on how to get Bearer token
curl -X POST https://api.vital.ai/v2/user/
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json
{
"client_user_id": "ysad21321-...",
"user_id": "5f89d39b-6edf-449a-bb47-65c08fa8aed9"
}
Updated about 2 months ago
Did this page help you?