Frontline AI connects to your Sonar instance through Sonar’s API. To turn that connection on, you create a personal access token in Sonar and share it with Frontline AI in a secure way.
This guide walks you through setting up a dedicated Sonar role and user, turning on the permissions Frontline AI needs, and creating the token.
The token is shown only once, so have a safe place ready to copy it before you start.
Before you start #
You will need:
- A Sonar instance you can log in to. Your login URL looks like
https://yourcompany.sonar.software. - Permission to create a role and a user, or a Super Admin who can do that for you.
- Time to log in as the new user. The token has to be created while you are signed in as that user, not as your everyday admin login.
Sonar’s own guidance is to give the integration its own role and user, with only the permissions the integration needs. That way, if the user or token is ever compromised, the exposure is as limited as possible.
Required role permissions #
Create a dedicated role with only these permissions, then assign it to the API user:
- Only view inventory assigned to accounts and network sites that you have permission to view, to yourself, or assigned to a vehicle that you are a driver of
- Update the billing parameters on an account
- Perform an action that creates an account transaction (e.g. a payment, debit, discount.)
- View all account transactions
- View accounts and related entities
- Update an account and related entities
- Create a new payment method (e.g. credit card.)
- View all payment methods
- Create a new payment
- Update a payment method
- View Calix service details on an account
Step 1: Create the role and the API user #
- In Sonar, go to Settings → Security → Roles and click Create Role.
- Name the role something clear, such as Frontline AI.
- Enable only the permissions in the checklist above, then save the role.
- Go to Settings → Security → Users and click Create User.
- Fill in the new user’s details, assign the role you just created, and click Create.
Sonar emails the new user a link to set a password and finish setup. That person must complete this before they can log in. The link is valid for 48 hours. If it expires, a Super Admin can resend it from Settings → Security → Users.
Step 2: Create the personal access token #
- Log in to Sonar as the API user you just created.
- Click the Avatar in the top-right corner (by default, this is the first letter of the username).
- Select the Personal Access Tokens tab to open the management page.
- Click Create Personal Access Token.
- Give the token a name. Sonar’s best practice is to name it after the device, vendor, or server that will be integrating with Sonar. For this integration, use a name such as Frontline AI.
- Submit the form. Sonar shows the token in a new window. Copy it immediately and store it somewhere safe. The token is available only after you submit the form, and it is hidden afterward for security purposes. You will not be able to view it again.
- Click Confirm. The token then appears in the Personal Access Tokens section, where you can delete it later if you need to replace it.
What to send to Frontline AI #
Share the token with Frontline AI through One-Time Secret, a service that turns it into a link that can be opened only once.
- Copy the token right after creating it.
- Go to onetimesecret.com, paste the token into the secret box, and create the secret link.
- Email that one-time link, not the raw token, to support@frontlineai.si, along with your Sonar instance URL (
https://yourcompany.sonar.software), the API user’s username, and your company name.
If you are signing up through the Sonar free offer form, that form already asks for your Sonar URL.
Do not email the raw token, and do not paste it into tickets, chat, or screenshots. Treat it like a password. Send only the One-Time Secret link to support@frontlineai.si.
Frontline AI uses the token to call your instance at:
https://<your-instance>.sonar.software/api/graphql
You only need to send the login URL, the API user’s username, and the token. Frontline AI will build the API endpoint from your Sonar URL.
Troubleshooting #
I do not see the Personal Access Tokens tab, or I cannot click Create Personal Access Token.
Make sure you are logged in as the dedicated API user, not only as a different admin. If the tab or button is still missing, ask a Super Admin to confirm that this user is enabled and has completed setup.
I closed the window before I copied the token.
Sonar will not show that token again. Delete it from the Personal Access Tokens tab if you want to keep the list tidy, then click Create Personal Access Token and create a new one. Copy the new token before you click Confirm, and send only the new token to Frontline AI through One-Time Secret, as described above.
The token stopped working.
It may have been deleted in Sonar, or the API user may have been disabled. Create a new token while logged in as the API user (or re-enable the user first), then send the new token to Frontline AI through a new One-Time Secret link, as described above. Official Sonar documentation does not list an expiration date for personal access tokens. A token stays listed on the Personal Access Tokens tab until you delete it.
Frontline AI can connect, but some features do not work.
Check that the API user’s role has every permission in the checklist above, including View Calix service details on an account. If a permission was missed, add it to the role and tell Frontline AI to try again. You usually do not need a new token after updating the role.
The new user never got the setup email, or the link expired.
From Settings → Security → Users, open the menu next to that user and choose Resend User Creation Email. The user should use the most recent email. The link is valid for 48 hours.
