How to Create a Cloverleaf Integration as a Developer
Contact the Cloverleaf engineer team at firstname.lastname@example.org and tell us you’re creating a Cloverleaf Integration.
Provide us the following information:
square logo image (ideally 80x80 px or larger)
integration documentation URL OR company URL
support URL OR email address
best point of contact’s email address for this integration, which might be yours
In return, we will issue you a client ID and secret. We use the OpenID Connect (OIDC) protocol for authentication and these pertain to it.
Now that you have the client ID and secret, you can integrate using OIDC. The flow is:
GET https://app.cloverleaf.me/api/oidc/auth with parameters:
client_id=<your client ID>
redirect_uri=<integration's callback URL>
state=<unique, ideally random state value>
redirect_uriabove. This is your integration’s callback URL for receiving, via URL parameters, the authorization code.
303 Redirectresponse will come back, sending the user to:
sign into Cloverleaf if not already
then the SSO Consent page, where they click Authorize to allow the integration access to Cloverleaf
Once Authorized, your
redirect_uriwill be hit with a
GETrequest, with the following URL params:
codethe authorization code your integration will use to exchange for an access token
issthe auth code issuer, which is Cloverleaf
statethe unique state value your integration initially provided, for verification
Once the auth code is obtained, it’s time to exchange it for the access token that lets the integration use Cloverleaf
Your integration will make a POST request:
with x-www-form-urlencoded parameters:
client_id: <your client ID>
client_secret: <your client secret>
code: <auth code given in Step 7>
redirect_uri: <integration's callback URL>
access_tokenwill be returned, allowing the integration access to Cloverleaf on behalf of the user.
authorizationheader as a bearer token when calling the Cloverleaf Public API endpoint: