Potion is a social API and users are the core feature of your incoming network. The User entry will allow you to create, edit and delete users from your database
Create a user
To create a user you have to make a HTTP POST request with parameters in JSON form. There are some required parameters for this operation:
string: Must be unique, see Nickname availability
string: Must be unique, api will send error code
A user already exist with that emailif already taken
string: Must match your security requirement, see Advanced configuration
boolean: Must be true in order to be stored for GDPR consentment informations
boolean: Mmust be true in order to be stored for GDPR consentment informations
You can also pass more data, please refer to User's creation to see all the available fields.
You also can pass those parameters as form-data instead of JSON.
Retrieve user unique ID
Congratulation, your user is now created, you must have received this kind of response from the API:
id field form the answer ? It is your user unique ID, this ID will be used for whatever API operation you want to perform with this user, most of the times you will be asked for
owner_id, this is this number we are asking for if you want to associate this user to a content.
List all users
Once some users were created, you will most of the time need to display them. You can gather them with an HTTP GET request.
Some filtering parameters are available, like pagination, per role, by nickname... please refer to User's listing.
Users list response
Users listing are represented in a way to make your pagination easy. You will have a
total_items key to help you for your pagination and also to give you the total users informations. All your users are inside a
items key. A typical users listing response will look like this :