@logi.one/document-client-gcp-secret
v0.2.8
Published
Google Cloud Secret manager support for LogiONE Document's API's client
Downloads
4
Maintainers
Readme
LogiONE Document Client with GCP Secret
This package add support for storing refresh token of LogiONE Document's API's client
@logi.one/document-client www.logi.one/document
Install
npm install @logi.one/document-client-gcp-secret
Quick start
Store the API key into Google Cloud Platform using Secret Manager
Then use createLogiONEDocumentClientWithGCPSecret
to create a client instance.
It will read the API key from the secret. The client will automatically refresh the token when it expires and save it to the same secret.
const { createLogiONEDocumentClientWithGCPSecret } = require('@logi.one/document-client-gcp-secret')
async function run() {
const secretName = 'projects/my-project/logione-doc-refreshtoken'
const client = await createLogiONEDocumentClientWithGCPSecret(secretName)
const documents = await client.search('documents', { limit: 10, columnFilters: [{ column: 'extension', value: 'docx', match: true }] })
console.table(documents)
}
run()
Need for support
If you need support, please feel free to contact us at [email protected]. We will be happy to help you.