Step 3: Make your first API call using the access token

You're all set to make your first API call using the access token!

Here, we'll retrieve details about a specific group. First, we'll locate the group ID on the platform. Then, we'll use that ID to call the Retrieve a group endpoint.

1. Find the ID of a group

  1. Log in ↗ to your 360Learning account.
  2. On the homepage, select a group from the left sidebar.
  3. In your browser’s URL bar, find the group ID as the string of characters located between group/ and /content. Copy this string—this is the group ID.

2. Request information about the group

Once again, this guide outlines two methods to call the the API:

  • Using curl.
  • Through the API reference portal.

Using curl

  1. Copy the curl example below.
curl --request GET \
     --url your_environment_url/api/v2/groups/groupId \
     --header 'accept: application/json' \
     --header '360-api-version: v2.0' \
     --header 'authorization: Bearer your_access_token'
  1. Paste it in a text editor.
  2. In line 2, replace your_environment_url with the URL for your environment:
  3. In line 2, replace groupId with the ID of the group.
  4. In line 5, replace your_access_token with the token you received in the previous step.
  5. Copy the code and paste it into your terminal.
  6. Hit Enter to execute the request.

Through the API reference portal

  1. Go to Retrieve a group.
  2. Under PATH PARAMS, enter the group ID.
  3. At the top right, select your preferred programming language.
  4. In the right panel under URL, click Base URL select the appropriate URL based on your environment:
    1. Production EU
    2. Production US
  5. In the code snippet panel on the right, click Try it! to execute the request.

3. Check the response

If successful, the API will return a JSON response containing information about the group.

[
  {
    "public": true,
    "name": "Engineering Team",
    "parentId": "507f1f77bcf86cd799439011",
    "custom": "Unit 101",
    "_id": "507f1f77bcf86cd799439011"
  }
]

💡

If you encounter any errors while making API calls, please refer to our dedicated Error handling guide for troubleshooting tips and common solutions.


What’s Next