Skip to main content

A Config is required provide the necessary details to the Client.create() method that connects to a Contensis project and allows for further refinements that are applied to each request made from the client instance that is returned

Properties

NameTypeDescription
rootUrlstringThe api url of the Contensis instance
accessTokenstringThe environment access token to authenticate requests
projectIdstringThe project API id to use with the client
languagestringThe language to request localized content for
versionStatus"latest" | "published"The content version to retrieve
pageSizenumberSet the number of results to return per page when requesting a PagedList
clientTypeClientGrantTypeAuthorise client requests using a specific type of credentials
clientDetailsClientGrantsAuthorise client requests using a specific set of credentials
defaultHeaders{ [key]: string}Any default headers to include with client requests
responseHandlerResponseHandlerAdd a callback function used when a response returns a specific or any HTTP status code
fetchFn(input: RequestInfo, init?: RequestInit): Promise<Response>Override the fetch API used when making HTTP requests

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request