POST/admin/v1/users/{userId}:createApiSession

Create API session

Create a User API session.

path parameters

  • userId

    string

    Required

    The identifier of the user.

Returns

  • accessToken

    string

    An authorization token which can be used to access the User API.

    This should be included in the Authorization header with a Bearer prefix.

  • expireTime

    date-time

    The expiration time for the session.

curl https://api.userhub.com/admin/v1/users/usr_MKFxzgJaAH8JQ4:createApiSession \
  -H "Authorization: Bearer $ADMIN_API_KEY" \
  -X POST
Response bodyJSON
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expireTime": "2024-06-15T13:00:00Z"
}
PreviousImport external user
NextCreate portal session

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth