Authentication, Filtering & Sorting
Last updated
Last updated
Please be sure of your agent type and version and pick the right documentation accordingly.
This is the documentation of the forest-express-sequelize
and forest-express-mongoose
Node.js agents that will soon reach end-of-support.
forest-express-sequelize
v9 and forest-express-mongoose
v9 are replaced by @forestadmin/agent
v1.
Please check your agent type and version and read on or switch to the right documentation.
You first need to generate an authentication token to access the Zendesk API. We are going to use the basic authentication mechanism. More details provided here. The 2 parameters required are: a user email (agent) that is allowed to access Zendesk, and the API Key that you can retrieve from the Zendesk console:
These 2 parameters can be environment variables like this;
Zendesk API allows you to filter and sort the tickets/users, plus paginate the result.
What we need first, is to implement a way to transform the Forest Admin filtering, sorting and pagination convention to the Zendesk API format.
Learn more about how to authenticate, filter and sort with the Zendesk API.