API Configuration
To use an API Key, you must obtain a Bearer token by making a POST request to the GoldLeaf security endpoint.
Step 1: Obtain a Bearer Token
Make a POST request to the following endpoint: https://goldleaf.app/security/v1/token
Include the following raw body in your request:
{ "apiKey": "yourApiKey", "name": "yourApiKeyName", "grantType": "client_credentials" }
Step 2: Handle the Response
If the request is successful, the security token will be returned in the response as data.securityToken.
{ "data": { "securityToken": "yourSecurityToken" } }
Step 3: Access GoldLeaf APIs
To access the GoldLeaf APIs, you must pass the security token as a Bearer token in the Authorization header of your requests.
Example request header:
curl -X GET "https://goldleaf.app/api/v1/customers" \
-H "Authorization: Bearer <yourSecurityToken>"
