Skip to main content

Config for opencrvs

Jobs that use the opencrvs adaptor may require authentication. A "credential" for the opencrvs adaptor will follow the schema below. When using the CLI, you can set up your own state.configuration by using the sample below.

Sample Configuration​

Paste this into the configuration key of your state.json file and modify the values to run jobs locally.

{
"domain": "openfn.opencrvs.dev",
"clientId": "the-long-uuid-provided-by-opencrvs",
"clientSecret": "the-long-secret-key-provided-by-opencrvs"
}

Full Schema​

The full configuration schema describes each attribute of the credential and notes those that are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"domain": {
"title": "Your Domain",
"type": "string",
"description": "OpenCRVS domain",
"minLength": 1,
"examples": [
"openfn.opencrvs.dev"
]
},
"clientId": {
"title": "Client Id",
"type": "string",
"writeOnly": true,
"minLength": 1,
"description": "Your OpenCRVS client id",
"examples": [
"the-long-uuid-provided-by-opencrvs"
]
},
"clientSecret": {
"title": "Client Secret",
"type": "string",
"description": "Client Secret",
"writeOnly": true,
"minLength": 1,
"examples": [
"the-long-secret-key-provided-by-opencrvs"
]
},
"access_token": {
"title": "Access Token",
"type": "string",
"description": "Your OpenCRVS access token",
"writeOnly": true,
"minLength": 1,
"examples": [
"the-long-access-token-from-your-auth"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"domain",
"clientId",
"clientSecret"
]
}