Skip to main content

A Delivery API Client contains all of the operations we can perform with our content. A Config is required to provide the necessary details to the create() method that connects it to a Contensis project and allows for further refinements that are applied to each request made from the client instance that is returned.

TypeScript
Client.create(config: Config): Client

Client.configure(config: Config): void

Use Client.create() to return a Delivery API Client instance that contains all the methods we can call to fetch content

Parameters

NameTypeDescription
configConfigAn object that provide the necessary details connect to a Contensis project and other refinements

Static Properties

NameTypeDescription
createFunctionCreate a new Delivery API client
configureFunctionUpdate a Delivery API client configuration

Properties

NameTypeDescription
contentTypesContentTypeOperationsContent types operations
entriesEntryOperationsEntries operations
nodesNodeOperationsNodes operations
projectProjectOperationsProject operations
taxonomyTaxonomyOperationsTaxonomy operations
clientConfigConfigThe config the client was created with
bearerTokenstringThe bearer token used for API authentication
bearerTokenExpiryDateDateWhen the API authentication bearer token will expire
refreshTokenstringThe refresh token used to reauthenticate an expired session
refreshTokenExpiryDateDateWhen the API refresh token will expire
isBearerTokenExpired(): booleanHas the API bearer token expired
isRefreshTokenExpired(): booleanHas the API refresh token expired
ensureIsAuthorized(): Promise<string>Ensure the client is authorised

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