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: 

API Doco Button

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

  1. Log in as an Administrator user
  2. Click oAuth2 Applications from the Main Menu
  3. Create a new oAuth application by clicking the + button and enter the details:
    1. Title: Enter a useful title that will allow you to find this again later
    2. Redirect URI: Enter a website address to redirect to
    3. Scopes: Enter Manager, Trainer, Client
    4. Expiration time:  1
    5. Select the clubs you need to access using this application, usually one club per application is best.
    6. Authorization: Pre-authorized
    7. Status: Enabled
  4. 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

  1. Log into Fisikal as an Administrator user
  2. Click Users and Create a new Manager user.
    1. Use a distinctive name with 'API ' in it so that it is clear to other users that this is a special case.
    2. 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.
    3. Select the Club for the user the same as the club selected for the oAuth2 application.
    4. 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.
  3. 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.