-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdocs_api_get-user.html
61 lines (51 loc) · 4.29 KB
/
docs_api_get-user.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!-- Docs - API - Get User -->
<div class="section">
<h2><a href="/docs/">Docs</a> : <a href="/docs/api/">API</a> : Get User</h2>
<p>The <span class="font-semibold">Get User</span> 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 <a href="/docs/sdk/sign-up/">signUp</a>, <a href="/docs/sdk/sign-in/">signIn</a>, or <a href="/docs/sdk/init/">init</a> methods in the <a href="/docs/sdk/">Userbase SDK</a>.</p>
<pre>
<code class="language-bash">
curl 'https://v1.userbase.com/v1/admin/users/$USER_ID' \
-XGET \
-H 'Authorization: Bearer $ACCESS_TOKEN'
</code>
</pre>
<h3 id="params">Parameters</h3>
<ul>
<li>
<span class="field">USER_ID</span> - The user ID to retrieve.
</li>
<li>
<span class="field">ACCESS_TOKEN</span> - Your access token.
</li>
</ul>
<h3 id="result">Result</h3>
<ul>
<li><span class="field">username</span> [string] - The user's username.</li>
<li><span class="field">userId</span> [string] - The user's unique identifier.</li>
<li><span class="field">appId</span> [string] - The app id which the user belongs to.</li>
<li><span class="field">creationDate</span> [string] - The timestamp when the user was created.</li>
<li><span class="field">email</span> [string] - The user's email address, if available.</li>
<li><span class="field">deleted</span> [string] - The timestamp when the user was deleted.</li>
<li><span class="field">profile</span> [object] - The user's profile.</li>
<li><span class="field">protectedProfile</span> [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).</li>
<li><span class="field">testStripeData</span> [object] - The user's relevant test Stripe data.</li>
<ul>
<li><span class="field">customerId</span> [string] - The users's unique customer identifier generated automatically by Stripe when the user succesfully purchases a subscription.</li>
<li><span class="field">subscriptionStatus</span> [string] - The user's subscription status. Can be 'active', 'incomplete', 'incomplete_expired', 'past_due', 'canceled', or 'unpaid'. Each status is explained further <a href="https://stripe.com/docs/api/subscriptions/object#subscription_object-status" target="_blank">here</a>.</li>
<li><span class="field">trialExpirationDate</span> [string] - The date the user's trial expires.</li>
<li><span class="field">cancelSubscriptionAt</span> [string] - The date the user's subscription is set to be canceled.</li>
<li><span class="field">subscriptionId</span> [string] - The users's unique subscription identifier generated automatically by Stripe when the user succesfully purchases a subscription.</li>
<li><span class="field">subscriptionPlanId</span> [string] - The subscription plan the user is subscribed to.</li>
</ul>
<li><span class="field">prodStripeData</span> [object] - The user's relevant production Stripe data.</li>
<ul>
<li><span class="field">customerId</span> [string] - The users's unique customer identifier generated automatically by Stripe when the user succesfully purchases a subscription.</li>
<li><span class="field">subscriptionStatus</span> [string] - The user's subscription status. Can be 'active', 'incomplete', 'incomplete_expired', 'past_due', 'canceled', or 'unpaid'. Each status is explained further <a href="https://stripe.com/docs/api/subscriptions/object#subscription_object-status" target="_blank">here</a>.</li>
<li><span class="field">trialExpirationDate</span> [string] - The date the user's trial expires.</li>
<li><span class="field">cancelSubscriptionAt</span> [string] - The date the user's subscription is set to be canceled.</li>
<li><span class="field">subscriptionId</span> [string] - The users's unique subscription identifier generated automatically by Stripe when the user succesfully purchases a subscription.</li>
<li><span class="field">subscriptionPlanId</span> [string] - The subscription plan the user is subscribed to.</li>
</ul>
</ul>
</div>
<hr>