How to integrate with Fisikal using the API
Fisikal has a comprehensive set of APIs that can be used to perform tasks in any Fisikal instance.
Each instance has its own API documentation link which you can access from the bottom of every page. Please direct your API developer to that link.
Otherwise use this link for our main site, but the base url may be different for your instance:
How to get credentials to start using the API
If you have Administrator access to your instance then you can self support, otherwise please get in touch with your Fisikal support team to get all the keys you need to make calls using the API.
To grant someone access to the API you must:
- Create an oAuth2 application in Fisikal to get a Client ID and Client Secret
- Create a Manager user for the API to log in as and get Username and Password
Instructions to create oAuth2 application
- Log in as an Administrator user
- Click oAuth2 Applications from the Main Menu
- Create a new oAuth application by clicking the + button and enter the details:
- Title: Enter a useful title that will allow you to find this again later
- Redirect URI: Enter a website address to redirect to
- Scopes: Enter Manager, Trainer, Client
- Expiration time: 1
- Select the clubs you need to access using this application, usually one club per application is best.
- Authorization: Pre-authorized
- Status: Enabled
- Click Create and the application will be created, click the details of the application in the list again, and now when the application re-opens the Client ID and Client Secret values are created. Copy and share these two values to the person creating your API calls.
How to create a Manager User for an API connection
- Log into Fisikal as an Administrator user
- Click Users and Create a new Manager user.
- Use a distinctive name with 'API ' in it so that it is clear to other users that this is a special case.
- Use a fake API user email address. It must be a valid looking address and must be unique, but as we are setting the password it does not need to be able to receive emails.
You must share this email address to your API developer. - Select the Club for the user the same as the club selected for the oAuth2 application.
- Set the password for the user to something that is crazy complicated. We recommend a 16 character generated password: https://passwordsgenerator.net/
You must share this password to the API developer.
- Click create and then we recommend you log out and attempt to log in using this user to confirm success.
The API developer now has all the required information to request an authentication token:
They must send a request to the [base_url]/oauth/token location for your instance and include all of the above values.
If successful the response is an access token that must be included in the header of all subsequent API requests.