Authenticate
Make an API key
Section titled “Make an API key”- An owner of your organization signs in to
https://console.1.aeand opens Credentials. - The owner types a label, for example
billing system, and selects Issue a key. - The console shows the key once. Copy it into your secrets store. 1.ae cannot show the key again.
The key starts with 1ae.. Send it in the Authorization header of each call.
Authorization: Bearer 1ae.ZW50aXR5LTNmOWExYzJiNGQ1ZS5…Only an owner can issue or revoke a key. Other members of your organization see the list of keys, but not the keys. All your keys share your organization’s quotas.
Use a token instead
Section titled “Use a token instead”Use a token if your security policy does not allow a long-lived key in each request.
- Ask your 1.ae contact for a client ID and a client secret.
- Get a short-lived token with the OAuth 2.0 client credentials grant.
- Send the token in place of the key.
curl -s https://idp.1.ae/realms/horizon/protocol/openid-connect/token \ -d grant_type=client_credentials \ -d client_id="$CLIENT_ID" \ --data-urlencode client_secret="$CLIENT_SECRET"# -> {"access_token":"eyJhbGciOi…","expires_in":3600,"token_type":"Bearer", …}Use the same token again until it is near the end of expires_in. The key and the token give the same access.