-
Notifications
You must be signed in to change notification settings - Fork 0
User Object
The user object is how the API represents a user, it has their information including their email and username.
{
"id":"90e2f0f8-a349-4c49-b5ad-48bb5e622f51",
"username":"CoPokBl",
"email":"support@serble.net",
"verifiedEmail":true,
"permLevel":2,
"premiumLevel":10,
"permString":null,
"stripeCustomerId":"cus_Jh3p1C2BivdGZC",
"authorizedApps":[
{
"appId":"d009ebce-4e72-4f66-e244-d87117e6077f",
"scopes":"1000"
},
{
"appId":"7117eca4-9ebc-b7e4-8bcf-651e009eb040",
"scopes":"0010"
}
]
}
This is the user ID, this is how the API identifies all users and how all services should also identify their users.
This field specifies the Username of the user, this is a name selected by them and does not have very many limits so be careful of things like SQL injection.
This is the user's email, they do not have to provide an email and this field will be null if they don't. If you wish to make contact with the user, use this email.
Whether or not the user has verified their email, if this is false then there is no way of knowing if the email actually belongs to this user.
Defines the level of access the user has to Serble systems.
0
: This means that the account is disabled
1
: This means that the account is normal and has no special permissions or restrictions
2
: This means that the account is owned by a Serble administrator and they can manage the API
This specifies whether or not the account is subscribed to a Serble subscription.
0
: The user is not currently subscribed to a product
10
: The user is subscribed to Serble Premium
This is an old field that is no longer used. It is only there for backwards compatibility, it will always be null.
The user's ID for Stripe. Stripe is the service that Serble uses to manage payments. This ID is used to manage the customer's payments and subscriptions.
This is a list of apps that are authorized to access aspects of a user's account.
{
"appId":"d009ebce-4e72-4f66-e244-d87117e6077f",
"scopes":"1000"
}
appId
: The ID of the app that was authorized
scopes
: How much access was given to that app
See here for more information on OAuth
The scope string is made up of numbers, you can think of it as an array of booleans, each number is either 0
for not allowed or 1
for allowed.
- Full Account Access
- File Hosting Access
- Account Information
- Control Of Authorized Appliations (Doesn't work anymore)
If you only wanted the app to access account information then you would have the scope as
0010
.
If you wanted the app to have full access to an account then you would do1111
or just have a1
at the start.