The identifier of the user.
Create API session
POST
/admin/v1/users/{userId}:createApiSessionCreate a User API session.
Returns
curl https://api.userhub.com/admin/v1/users/usr_MKFxzgJaAH8JQ4:createApiSession \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
-X POST
const res = await adminApi.users.createApiSession(
"usr_MKFxzgJaAH8JQ4",
);
res, err := adminApi.Users().CreateApiSession(
context.Background(),
"usr_MKFxzgJaAH8JQ4",
nil,
)
$res = $adminApi->users->createApiSession(
userId: 'usr_MKFxzgJaAH8JQ4',
);
res = admin_api.users.create_api_session(
user_id="usr_MKFxzgJaAH8JQ4",
)
Response bodyJSON
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expireTime": "2024-11-15T13:00:00Z"
}