Make your first API call
To get started with Akamai APIs, create a basic API client for authentication.
Create a basic API client
A basic API client is configured to automatically give you access to the first 99 API you have permissions to use. If you need to configure your client to specific endpoints, create an advanced client instead and then call an endpoint.
-
Navigate to the Identity and Access Management section of Akamai Control Center and click Create API Client.
-
Click Quick and then Download in the Credentials section.
-
Open the downloaded file with a text editor and add
[default]
as a header above all text.[default] client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN= host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
-
Save the file in your home directory with the name
.edgerc
.// Linux $ /home/{username}/.edgerc // MacOS $ /Users/{username}/.edgerc // Windows C:\Users\{username}\.edgerc
Call an endpoint
Your API client is used as an encrypted hash-based message authentication code or HMAC-SHA-256. This makes sending a cURL request on the command line tricky, so we suggest using helpers like Postman and HTTPie.
This example uses Postman to get user profile information with the Identity and Access Management API.
- Open your Postman application or run the call in your browser from the Postman site.
- Choose
GET
as the method and add thehost
from your API client to the profile endpoint:/identity-management/v3/user-profile
. - Click the Authorization tab, choose Akamai EdgeGrid from the type dropdown menu, and add your access and client tokens and your client secret.
- Add the
Content-Type
andAccept
headers to acceptapplication/JSON
on the Headers tab. - Click Send.
A successful call returns a HTTP 200 OK
status code and a JSON body containing your profile information.
{
"uiIdentityId": "A-B-1234567",
"firstName": "John",
"lastName": "Smith",
"uiUserName": "jsmith",
"email": "example@example.com",
"accountId": "A-CCT1234",
"phone": "+1 311 555 2368",
"timeZone": "GMT",
"lastLoginDate": "2022-10-14T18:01:26.000Z",
"tfaEnabled": true,
"additionalAuthentication": "TFA",
"preferredLanguage": "English",
"sessionTimeOut": 64800,
"passwordExpiryDate": "2296-05-22T17:46:24.000Z",
"mobilePhone": "3115552368",
"address": "123 My Street",
"city": "San Mateo",
"state": "CA",
"zipCode": "94404",
"country": "USA",
"jobTitle": "Internet Technologist",
"tfaConfigured": false,
"additionalAuthenticationConfigured": false,
"isLocked": false
}
See also
Updated over 1 year ago