Laravel Forge JavaScript SDK

User

User

Get Authenticated User

Method

forge.user.get()

Usage

1const forge = new Forge('API_TOKEN');
2
3const user = await forge.user.get();

Response

1{
2 "user": {
3 "id": 1,
4 "name": "Mohamed Said",
5 "email": "mail@gmail.com",
6 "card_last_four": "1881",
7 "connected_to_github": true,
8 "connected_to_gitlab": true,
9 "connected_to_bitbucket": false,
10 "connected_to_bitbucket_two": true,
11 "connected_to_digitalocean": true,
12 "connected_to_linode": true,
13 "connected_to_vultr": true,
14 "connected_to_aws": true,
15 "connected_to_hetzner": true,
16 "ready_for_billing": true,
17 "stripe_is_active": 1,
18 "stripe_plan": "yearly-basic-199-trial",
19 "subscribed": 1,
20 "can_create_servers": true,
21 "2fa_enabled": false
22 }
23}
Edit this page on GitHub