Skip to main content

Spencer Agent API Documentation

This guide explains how to use the Spencer Agent API to fetch and create data in Spencer.

Written by Tom Segers

πŸ” Authentication

The Spencer Agent API is secured using the OAuth 2.0 Client Credentials flow.
To authenticate, you'll need a Client ID and Client Secret, which can be requested by contacting [email protected].

API specifications can be found here


πŸ“Œ Usage Example: Retrieve News for a Specific User List

This example demonstrates how to retrieve news items for a specific user list, such as for use in digital signage.

Step 1: Request an Access Token

Make a POST request to the following endpoint:

POST /auth/oauth2/realms/root/realms/{customer}/access_token 
Host: spencermultissov2-production-identity.spencer.co
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id={clientId}
&client_secret={clientSecret}

Variables used:

  • {customer}: Your customer ID

  • {clientId} and {clientSecret}: Provided by Spencer support


Step 2: Fetch News Publications (example)

Make a GET request to the endpoint below:

GET /agent/integration/api/v1/news/user-lists/{userListId}/publications HTTP/1.1 
Host: {customer}-api.spencer.co:8080
Content-Type: application/json
Authorization: Bearer {accessToken}

Variables:

  • {customer}: Your customer ID

  • {userListId}: The UUID of the user list (available in the Spencer Back Office)

  • {accessToken}: the access token found in the response of the previous API call

Did this answer your question?