Config for formsg
Jobs that use the formsg
adaptor may require authentication. A
"credential" for the formsg
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.
{
"formSecretKey": "your-secret-key-here"
}
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": {
"mode": {
"title": "SDK Mode",
"type": "string",
"enum": [
"production",
"staging",
"development"
],
"description": "FormSG SDK mode (production, staging, or development)",
"default": "development",
"examples": [
"development"
]
},
"formSecretKey": {
"title": "Form Secret Key",
"type": "string",
"description": "Your form's secret key downloaded from FormSG upon form creation",
"writeOnly": true,
"minLength": 1,
"examples": [
"your-secret-key-here"
]
},
"webhookEndpoint": {
"title": "Webhook Endpoint",
"type": "string",
"description": "The URI of your webhook endpoint (used for signature verification)",
"format": "uri",
"examples": [
"https://my-domain.com/submissions"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"formSecretKey"
]
}