The Get User API lets you retrieve all the metadata associated with any of your users by providing the ID of a user from your account. The user ID can be obtained from the Admin panel, or from the signUp, signIn, or init methods in the Userbase SDK.
curl 'https://v1.userbase.com/v1/admin/users/$USER_ID' \
-XGET \
-H 'Authorization: Bearer $ACCESS_TOKEN'
Parameters
-
USER_ID - The user ID to retrieve.
-
ACCESS_TOKEN - Your access token.
Result
- username [string] - The user's username.
- userId [string] - The user's unique identifier.
- appId [string] - The app id which the user belongs to.
- creationDate [string] - The timestamp when the user was created.
- email [string] - The user's email address, if available.
- deleted [string] - The timestamp when the user was deleted.
- profile [object] - The user's profile.
- protectedProfile [object] - The user's protected profile. The protected profile can only be modified by the Admin API, so it can be used for metadata that shouldn't by updated directly by the user (such as payment status info).
- testStripeData [object] - The user's relevant test Stripe data.
- customerId [string] - The users's unique customer identifier generated automatically by Stripe when the user succesfully purchases a subscription.
- subscriptionStatus [string] - The user's subscription status. Can be 'active', 'incomplete', 'incomplete_expired', 'past_due', 'canceled', or 'unpaid'. Each status is explained further here.
- trialExpirationDate [string] - The date the user's trial expires.
- cancelSubscriptionAt [string] - The date the user's subscription is set to be canceled.
- subscriptionId [string] - The users's unique subscription identifier generated automatically by Stripe when the user succesfully purchases a subscription.
- subscriptionPlanId [string] - The subscription plan the user is subscribed to.
- prodStripeData [object] - The user's relevant production Stripe data.
- customerId [string] - The users's unique customer identifier generated automatically by Stripe when the user succesfully purchases a subscription.
- subscriptionStatus [string] - The user's subscription status. Can be 'active', 'incomplete', 'incomplete_expired', 'past_due', 'canceled', or 'unpaid'. Each status is explained further here.
- trialExpirationDate [string] - The date the user's trial expires.
- cancelSubscriptionAt [string] - The date the user's subscription is set to be canceled.
- subscriptionId [string] - The users's unique subscription identifier generated automatically by Stripe when the user succesfully purchases a subscription.
- subscriptionPlanId [string] - The subscription plan the user is subscribed to.