This article explains how to develop a custom tile in your customers' app. This allows you to expand the capabilities of our software infinitely.
When the user taps your tile in the Hexfit mobile app, we open a WebView to the URL you previously provided.
If you wish, before opening the page, the app can automatically inject information about the logged-in user directly into the URL as variables.
Available Variables
Variable | Content |
{{FIRSTNAME}} | User's first name |
{{LASTNAME}} | User's last name |
{{EMAIL}} | User's email address |
{{APIKEY}} | User's Hexfit API key |
You can place these variables anywhere in the URL you provide to us. For example:
https://votre-app.exemple.com/entree?apikey={{APIKEY}}&email={{EMAIL}}
When a user taps the tile, the app replaces the variables and opens the actual URL:
https://votre-app.exemple.com/entree?apikey=abc123&email=jane@exemple.com
This allows you to customize the tile’s content based on the user’s context.
Identify the user on the server side
Once your page receives the `{{APIKEY}}` key, you can call the Hexfit API to retrieve the user's full profile:
GET https://v2.hexfit.io/User/GetInfo?user_id=-
Authorization: Bearer <APIKEY>
The `user_id=-` is a shortcut that returns information about the key's owner, i.e., the currently logged-in user.
Documentation: https://docs.hexfit.com/#tag/users/GET/User/GetInfo
⚠️ **Security Note:**
Your API key is personal. Always use HTTPS and do not store it in plain text.
API Key for Development
For development purposes, we recommend logging into the software with your own customer account. Retrieve the API Key from the header and use it for testing.
The API Key will expire, so feel free to repeat the process to obtain a new key.
Our API documentation is available here: https://docs.hexfit.com/
I am developing a custom tile for the Hexfit mobile app.
Hexfit is a platform used by health and fitness professionals (kinesiologists, trainers, physical therapists) to track their clients.
A custom tile is a small web application that appears in the client interface of the Hexfit mobile app. It is loaded via an external URL into a mobile webview.
When loading, Hexfit provides the following in the URL:
- apikey
- sometimes other contextual parameters
The tile must:
- read the parameters present in the URL
- use the apikey to call the Hexfit API (User/GetInfo?user_id=- to determine who the APIKEY belongs to)
- retrieve the client’s data
- display this data in a simple and useful interface
- not cache the page content since the API key changes each time the page is opened
Constraints:
- run in a mobile webview
- be mobile-first and responsive
- be secure
- display a clear and simple interface
Hexfit Documentation:
- API documentation: https://apidoc.myhexfit.com/
- Custom Tiles Guide: https://help.myhexfit.com/fr/articles/13921809-tuiles-personnalisees-guide-developpeur-externe
Webview features:
Although coding is often quite easy, having someone with technical expertise on hand can be a huge help. |
Launch
Once your site is ready, simply send us the link and we’ll set it up on your app.