How it works
Flowella supports three OAuth grants: authorisation code with PKCE for customers’ organisations, client credentials for your own organisation, and refresh tokens. The sequence shows how a customer installs your app with the authorisation code grant.Before you start
- You need the Owner or Admin role in the organisation that will own the app. Other roles can see Developer apps in the menu, but the list does not load for them.
- Your app needs a callback address (redirect URI) that can receive the authorisation code.
- Your app must send a
statevalue and a PKCEcode_challengemade withS256on every authorisation request.
Register an app
1
Open Developer apps
Go to Settings, then select Developer apps in the Developer group.
2
Start a new app
Select Create app. The Create developer app dialog opens.
3
Name the app
In App name, enter the name customers know your product by, up to 120 characters, for example
Acme CRM connector.4
Add redirect URIs
In Redirect URIs, enter each callback address on its own line, up to 20. During authorisation, the
redirect_uri your app sends must match one of these exactly.5
Choose scopes
Under Scopes, the read scopes are ticked for you. Tick any other scope your app needs and untick the ones it does not. These are the most your app can ever request. See Scopes.
6
Create the app and copy the secret
Select Create app. The Save your client secret dialog shows the client secret, which starts with
flc_. Select Copy, store the secret on your server, then select Done.floa_), Redirect URIs and Created date, with a Delete button under Actions.
Send a customer through authorisation
Send the customer’s browser to the authorise endpoint on the Flowella app host:
If the request is invalid, Flowella shows an error instead of the consent screen and does not redirect. This happens, for example, when the
redirect_uri does not match or a scope is not allowed.
What the customer sees
- If the person is not signed in, Flowella asks them to sign in first.
- The person must be an Owner or Admin of the organisation. Anyone else sees the error
Owner or admin role required to authorize apps. - The Authorize app screen shows your Client ID: and the Requested scopes:. If your app did not send a
scope, it says This app will receive its default allowed scopes. - The person selects Allow access or Deny.
redirect_uri with code and state in the query string. The code is valid for 10 minutes and works once. Deny sends the browser to your redirect_uri with error=access_denied, an error_description and your state.
Exchange the code for tokens
Your server exchanges the code at the token endpoint. Authenticate with your client ID and secret, either with HTTP Basic authentication or asclient_id and client_secret in the body. The body can be form-encoded or JSON.
The token endpoint accepts 30 requests a minute for each client ID and IP address. Above that, it returns
429 with a Retry-After header.
Call the API
Send the access token as a bearer token, exactly like an API key:403 INSUFFICIENT_SCOPE. Each access token has its own rate limit. See the API introduction.
POST /v1/templates/send accepts API keys only and refuses OAuth access tokens with 401.Refresh an access token
Before the access token expires, request a new one withgrant_type=refresh_token, the refresh_token and your client authentication. The response has a new access token and a new refresh token, and the old refresh token stops working. If someone presents a refresh token that was already used, Flowella revokes every token issued from that authorisation, and the customer has to approve your app again.
Access your own organisation
To call the API for the organisation that owns the app, usegrant_type=client_credentials with your client authentication and an optional scope. You get an access token without a refresh token. Your app then appears under Installed apps in your own organisation.
Revoke or inspect a token
Both endpoints need your client authentication. The discovery document at
https://app.flowella.io/.well-known/oauth-authorization-server lists every endpoint and supported option.
Review and revoke installed apps
Customers manage the apps they have approved under Installed apps. You need the Owner or Admin role. The list shows:
To revoke an app:
- Go to Settings, then select Installed apps in the Developer group.
- Select Revoke on the app’s row.
- Confirm the prompt Revoke this install? Existing tokens stop working.
Revoking your own app in your own organisation does not stop the client credentials grant: the app can request a new token, which turns the install back on. To cut off your own app completely, delete it under Developer apps.
Delete an app
In Developer apps, select Delete on the app’s row and confirm Delete this app and its tokens? Flowella removes the app, its install in every organisation that approved it, and all its tokens. This cannot be undone.Troubleshooting
Could not load developer apps or Could not load installed apps
Could not load developer apps or Could not load installed apps
Only Owners and Admins can view these screens. Ask an Owner or Admin to manage the app for you. Roles can’t be changed in the app: see Change someone’s role.
Redirect URI mismatch
Redirect URI mismatch
The
redirect_uri in the request must match one of the app’s registered redirect URIs exactly, including the scheme, path and any trailing slash. The same value must be sent again when you exchange the code. You cannot edit an app’s redirect URIs, so register a new app if you need a different one.invalid_scope
invalid_scope
A requested scope is misspelt or is not one of the app’s scopes. Request only scopes you ticked when you registered the app.
The code exchange fails
The code exchange fails
The messages
Authorization code expired and Authorization code already used mean you need to start the authorisation again: codes last 10 minutes and work once. PKCE verification failed means the code_verifier does not match the code_challenge you sent.Related
API introduction
Authentication, scopes, rate limits and errors.
Developer hub
Recent API requests, quickstarts and the API sandbox.
API keys
Simpler access for your own scripts and integrations.
Webhooks reference
React to events in the organisations that install your app.

