Skip to main content
How to use the agent API

Connect to our agent API

Tom Segers avatar
Written by Tom Segers
Updated over 2 weeks ago

Below you can find the steps on how to access the agent API

Step 1: Request bearer token

You can request an bearer token via a POST request to the following URL:

In the path you need to replace {tenant} with xxx

In the body of the request you need to add the following parameters:

grant_type=client_credentials

&client_id=<client_id>

&client_secret=<client_secret>

The parameter client_secret will be provided in a separate email.

Step 2: Retrieve news for userlist

To fetch the articles for a given userlist, do a GET request to the following endpoint:

https://{tenant}-api.spencer.co/agent/integration/api/v1/news/user-lists/{userListId}/publications

In the path you need to replace {tenant} with xxx , and {userListId} with the UUID of the userlist which can be found in the backoffice when viewing a given userlist.

Use the Bearer token from the 1st API call in the Authorization header.

Since a {userListId} represents an individual screen this needs to be done for each screen you have deployed .

Did this answer your question?