Schema for Ratatoskr Provider Settings

From ProviderSettings.schema.yaml (ratatoskr/ProviderSettings.schema)

---
$id: https://skeleton.botmd.io/ratatoskr/ProviderSettings.schema
$schema: http://json-schema.org/draft-07/schema#

title: Provider Settings
description: >-
  `ProviderApplication.provider_settings` are used by `ratatoskr.providers.AbstractProvider`s to communicate with the Provider API.
  This field is not exposed to frontend.
  This is where we store secret credentials.

type: object
additionalProperties: false
oneOf:
  - required: [botmdhospital]
  - required: [line]
  - required: [messagebird]
  - required: [messenger]
  - required: [mock]
  - required: [noop]
  - required: [pinpoint]
  - required: [promotexter]
  - required: [pusher]
  - required: [qiscus]
  - required: [qontak]
  - required: [ses]
  - required: [smooch]
  - required: [smtp]
  - required: [telegram]
  - required: [twilio]
  - required: [viber]
  - required: [whatsapp]

properties:
  # Providers
  botmdhospital:
    $ref: "#/definitions/botmdhospital"

  line:
    $ref: "#/definitions/line"

  messagebird:
    $ref: "#/definitions/messagebird"

  messenger:
    $ref: "#/definitions/messenger"

  noop:
    $ref: "#/definitions/noop"

  pinpoint:
    $ref: "#/definitions/pinpoint"

  promotexter:
    $ref: "#/definitions/promotexter"

  pusher:
    $ref: "#/definitions/pusher"

  qiscus:
    $ref: "#/definitions/qiscus"

  qontak:
    $ref: "#/definitions/qontak"

  ses:
    $ref: "#/definitions/ses"

  smooch:
    $ref: "#/definitions/smooch"

  smtp:
    $ref: "#/definitions/smtp"

  telegram:
    $ref: "#/definitions/telegram"

  twilio:
    $ref: "#/definitions/twilio"

  viber:
    $ref: "#/definitions/viber"

  whatsapp:
    $ref: "#/definitions/whatsapp"

  # Add-on settings
  action_state:
    $ref: "#/definitions/action_state"

  billing:
    $ref: "#/definitions/billing"

  fcm:
    $ref: "#/definitions/fcm"

  phone:
    $ref: "#/definitions/phone"

  ratatoskr:
    $ref: "#/definitions/ratatoskr"
#end properties

definitions:
  botmdhospital:
    title: Bot MD Hospital
    description: Provider settings for Bot MD Hospital. This is a special provider that provides a `PhoneBasedProviderMixin` interface to Bot MD Hospital users.

    type: object
    additionalProperties: false
    required: []
    properties:
      hospitals:
        title: Hospitals
        description: The list of hospitals (`organization_key` or `uid`) to find profiles from. If not set, will look for profiles in all hospitals.

        type: array
        minItems: 1

        items:
          type: string
          minLength: 1

      multiple_profiles:
        title: Multiple Profiles
        description: "What to do when we encounter multiple possible profiles: deliver to `all` matching profiles, `first` matching profile (by hospital primary key), or raise an `exception`."

        enum: [all, first, exception]

      native_devices_only:
        title: Native Devices Only
        description: Delivers to native devices only. Defaults to delivery to both native and web devices.

        type: boolean
    #end properties
  #end botmdhospital

  line:
    title: Line
    description: Provider settings for Line.

    type: object
    required: [user_id, basic_id, channel_access_token, channel_secret]
    additionalProperties: false

    properties:
      user_id:
        title: User ID
        description: >-
          Bot user ID which can be obtained by querying Line API: `curl -H 'Authorization: Bearer <token>' https://api.line.me/v2/bot/info`.

        type: string
        pattern: "^U[0-9a-f]{32}$"

      basic_id:
        title: Basic ID
        description: Bot basic ID starting with `@`.
        type: string
        pattern: '^\@.+$'

      channel_access_token:
        title: Channel Access Token
        description: Token for accessing Line API. Found under `Channel > Messaging API`.
        type: string
        minLength: 1

      channel_secret:
        title: Channel Secret
        description: Secret for validating incoming webhooks. Found under `Channel > Basic Settings`.
        type: string
        minLength: 1

      login:
        title: Login
        description: When generating invitation URLs via Line login API, these settings are required.
        type: object
        required: [client_id, client_secret]
        additionalProperties: false

        properties:
          client_id:
            title: Client ID
            description: Client ID for Login API.
            type: string
            minLength: 1

          client_secret:
            title: Client Secret
            description: Client secret for Login API.
            type: string
            minLength: 1
      #end login

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1
      #end retry_attempts_limit

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      #end retry_seconds_ahead
    #end properties
  #end line

  messagebird:
    title: Messagebird
    description: Provider settings for Messagebird.

    type: object
    additionalProperties: false
    required: [api_key, channel_id, signing_key, business_no, namespace]
    properties:
      api_key:
        title: Key
        description: The Messagebird API `key`.
        type: string
        minLength: 1

      channel_id:
        title: Channel Id
        description: The Messagebird `Channel Id`.
        type: string
        minLength: 1

      signing_key:
        title: Signing Key
        description: The Messagebird `Signing Key`.
        type: string
        minLength: 1

      business_no:
        title: Business Number
        description: The business number registered on Messagebird.
        type: string
        pattern: '^\+\d{5,}$'

      namespace:
        title: Namespace
        description: The Messagebird `namespace`. This is required for sending WhatsApp template messages.
        type: string
        minLength: 1

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
    #end properties
  #end messagebird

  messenger:
    title: Messenger
    description: Provider settings for Messenger.

    type: object
    additionalProperties: false
    required: [access_token, app_id, verify_token, page_id, app_secret]
    properties:
      access_token:
        title: Access Token
        description: Page access token for interacting with Messenger API. Found in [Meta for Developers](https://developers.facebook.com/) under `Messenger > Settings > Access Tokens`.
        type: string
        minLength: 1

      app_id:
        title: App ID
        description: App ID for use with the Facebook Javascript SDK. This is needed for the `/ratatoskr/login` view. Found in [Meta for Developers](https://developers.facebook.com/) on the Dashboard.
        type: string
        minLength: 1

      verify_token:
        title: Verify Token
        description: Token for verifying webhook challenge. You choose this and set this in [Meta for Developers](https://developers.facebook.com/) under `Messenger > Settings > Callback URLs` or via the upsert webhook feature.
        type: string
        minLength: 1

      page_id:
        title: Page ID
        description: Page ID where the user will be able to send messages. Found in the page's URL or [Meta for Developers](https://developers.facebook.com/) under `Messenger > Settings > Pages`.
        type: string
        minLength: 1

      page_username:
        title: Page Username
        description: Username alias of page. Used for generating invite links. If not set, we will get this from the API.
        type: string
        minLength: 1

      app_secret:
        title: App Secret
        description: App secret for verifying payload signature and various other uses. Found in [Meta for Developers](https://developers.facebook.com/) under `Settings > Basic`.
        type: string
        minLength: 1

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1
      #end retry_attempts_limit

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      #end retry_seconds_ahead
    #end properties
  #end messenger

  noop:
    title: No-op
    description: Provider settings for `NoopProvider`.

    type: object
    additionalProperties: false
    required: []

    properties:
      skip_create_delivery:
        title: Skip Create Delivery
        description: Returns `SKIP_CREATE_DELIVERY` for all incoming payloads. Defaults to `false`.
        type: boolean

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
  #end noop

  pinpoint:
    title: AWS Pinpoint
    description: Provider settings for `PinpointProvider`.

    type: object
    additionalProperties: false
    required: [phone, keyword]

    properties:
      phone:
        title: Phone
        description: The `OriginationIdentity` or phone number we are sending SMSes from.
        type: string
        pattern: '^\+\d{5,}$'

      keyword:
        title: Keyword
        description: The keyword associated with the phone number.
        type: string
        minLength: 1

      sns_topic_arn:
        title: SNS Topic Arn
        description: The SNS topic ARN associated with this provider. This field is required to receive inbound messages.
        type: string
        pattern: '^arn\:aws\:sns\:[\w\-]+:\d+\:[\w\-]+$'
  #end pinpoint

  promotexter:
    title: PromoTexter
    description: Provider settings for PromoTexter.

    type: object
    additionalProperties: false
    oneOf:
      - required: [api_key, api_secret, viber_id]
      - required: [api_key, api_secret, sender_id]
    properties:
      api_key:
        title: API Key
        description: The PromoTexter `apiKey`.
        type: string
        minLength: 1

      api_secret:
        title: API Secret
        description: The PromoTexter `apiSecret`.
        type: string
        minLength: 1

      viber_id:
        title: Viber ID
        description: Viber ID associated with this account. Also known as `channel_id` in PromoTexter.
        type: string
        minLength: 1

      sms_from:
        title: SMS From
        description: Number to send SMS from.
        type: string
        pattern: '^\+\d{5,}$'

      sender_id:
        title: Sender ID
        description: This would appear as the sender of the message. Value must be whitelisted to your account.
        type: string
        minLength: 1

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1
      #end retry_attempts_limit

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      #end retry_seconds_ahead

      read_timeout:
        title: Read Timeout
        description: Number of seconds to wait before giving up on sending a message.
        type: integer
        minimum: 5

      connect_timeout:
        title: Connect Timeout
        description: Number of seconds to wait before giving up on connecting to Promotexter API.
        type: integer
        minimum: 3
    #end properties
  #end promotexter

  pusher:
    title: Pusher
    description: Provider settings for Pusher.

    type: object
    additionalProperties: false
    required: [app_id, key, secret]
    properties:
      app_id:
        title: App ID
        description: The Pusher `app_id`.
        type: string
        minLength: 1

      key:
        title: Key
        description: The Pusher App `key`.
        type: string
        minLength: 1

      secret:
        title: Secret
        description: The Pusher app `secret`.
        type: string
        minLength: 1
    #end properties
  #end pusher

  qiscus:
    title: Qiscus
    description: Provider settings for Qiscus.

    type: object
    additionalProperties: false
    oneOf:
      - required: [app_id, secret_key, wa]

    properties:
      app_id:
        title: API Key
        description: The Qiscus App ID which can be found in the _Settings -> App Information_ page.
        type: string
        minLength: 1

      secret_key:
        title: The Qiscus secret key which can be found in the _Settings -> App Information_ page.
        description: The Qiscus `apiSecret`.
        type: string
        minLength: 1

      agent_id:
        title: Agent ID
        description: This is the Qiscus agent ID from _Integration -> Bot Integration_ page. This is used to verify the webhook request. Defaults to `<app_id>_admin@qismo.com`.
        type: string
        format: email

      wa:
        title: WA
        description: Additional settings for WhatsApp channel.

        type: object
        required: [channel_id, from_number]
        additionalProperties: false

        properties:
          channel_id:
            title: Channel ID
            description: The Qiscus WhatsApp channel ID. See [https://documentation.qiscus.com/multichannel-customer-service/whatsapp-business-api#glossary](Qiscus instructions) on how to find it. Note that channel ID for Qiscus is an integer. Required for WhatsApp.
            type: integer

          from_number:
            title: From Number
            description: The number we are sending WhatsApp messages from. Use E.164 format.
            type: string
            pattern: '^\+\d{5,}$'

          namespace:
            title: Namespace
            description: The WhatsApp `namespace`. This is required for sending WhatsApp template messages. See [https://documentation.qiscus.com/multichannel-customer-service/whatsapp-business-api#glossary](Qiscus instructions) on how to find it. Preferred to have for WhatsApp.
            type: string
            minLength: 1
        #end properties
      #end whatsapp

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30

      read_timeout:
        title: Read Timeout
        description: Number of seconds to wait before giving up on sending a message.
        type: integer
        minimum: 5

      connect_timeout:
        title: Connect Timeout
        description: Number of seconds to wait before giving up on connecting to Qiscus API.
        type: integer
        minimum: 3
    #end properties
  #end qiscus

  qontak:
    title: Qontak
    description: Provider settings for Qontak.

    type: object
    additionalProperties: false
    oneOf:
      - required: [bot_access_token, phone_no, channel_integration_id]

    properties:
      omnichannel_access_token:
        title: Omnichannel Access Token
        description: This is Omnichannel API Access Token which can use for omnichannel related API.
        type: string

      bot_access_token:
        title: API Access Token
        description: This is BOT API Access Token which can use for bot related API.
        type: string

      phone_no:
        title: Account's phone no
        description: This is qontak's whatsapp account phone number identifier.
        type: string

      channel_integration_id:
        title: Qontak's channel account identifier
        description: This is channel integration id of a Qontak's account. Used for sending a direct broadcast messages
        type: string

      client_id:
        title: Qontak's channel account client_id
        description: Client ID is used for logging in to get non-bot token.
        type: string

      client_secret:
        title: Qontak's channel account client_secret
        description: Client Secret is used for logging in to get non-bot token.
        type: string

      agent_division_fallback:
        title: Agent division fallback
        description: Agent division to fallback when the desire division has no agent.
        type: string

      send_agent_handover_message:
        title: Send agent handover message
        description: Send agent handover message through incoming message flow.
        type: boolean

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1
      #end retry_attempts_limit

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      #end retry_seconds_ahead
    #end properties
  #end qontak

  ses:
    title: SES
    description: Provider settings for AWS Simple Email Service.

    type: object
    additionalProperties: false
    required: []

    properties:
      from:
        title: From
        description: "The `From` email when sending emails through this provider. Defaults to `Bot MD <noreply@botmd.io>`."

        type: string
        minLength: 1
      #end for

      sns_topic_arn:
        title: SNS Topic Arn
        description: The SNS topic ARN associated with this provider. This field is required to receive inbound emails. Currently used in `us-east-1` (N. Virginia) region and `ap-southeast-1` (Singapore) region.
        type: string
        pattern: '^arn\:aws\:sns\:(us\-east\-1|ap\-southeast\-1):\d+\:[\w\-]+$'
      #end for

      sns_client_region:
        title: SNS Client Region
        description: The Region of the SNS webhook associated with this provider. Default value is `us-east-1`.
        enum: [us-east-1, ap-southeast-1]
        default: us-east-1

      delete_immediately:
        title: Delete Immediately
        description: Delete email immediately after successfully reading it (in `iter_messages_from_payload`). Inbound emails are stored in the temporary buckets so they will be automatically deleted after a day. Defaults to `true`.

        type: boolean
      #end delete_immediately

      allowed_incoming:
        title: Allowed Incoming
        description: The list of sender email addresses this provider will allow.
        type: array
        minItems: 1

        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
        #end items
      #end allowed_incoming

      allowed_outgoing:
        title: Allowed Outgoing
        description: The list of email addresses this provider will deliver to.
        type: array
        minItems: 1

        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
        #end items
      #end allowed_outgoing

      denied_incoming:
        title: Denied Incoming
        description: Array of emails that are denied for incoming messages. If set, any emails not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
      #end denied_incoming

      denied_outgoing:
        title: Denied Outgoing
        description: Array of emails that are denied for outgoing messages. If set, any emails not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
      #end denied_outgoing

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      skip_sns_payload_validation:
        type: boolean
        description: true if this provider will skip the usual SNS payload validation. Use only if you trust the webhook caller.
        default: false
    #end properties
  #end ses

  smooch:
    title: Smooch (Deprecated)
    description: Provider settings for Smooch. This is deprecated.

    type: object
    additionalProperties: false
    required: [app_id, key_id, secret, integration_id]
    properties:
      app_id:
        title: App ID
        description: The Smooch App ID.
        type: string
        minLength: 1

      key_id:
        title: Key ID
        description: The `key_id` for authenticating against the Smooch API.
        type: string
        minLength: 1

      secret:
        title: Secret
        description: The `secret` for authenticating against the Smooch API.
        type: string
        minLength: 1

      integration_id:
        title: Integration ID
        description: The Smooch Integration ID.
        type: string
        minLength: 1

      webhook_secret:
        title: Webhook Secret
        description: A shared webhook secret to authenticate that the incoming webhook is from Smooch and not bogus.
        type: string
        minLength: 1

      namespace:
        title: Namespace
        description: The Smooch `namespace`. This is required for sending WhatsApp template messages.
        type: string
        minLength: 1

      phone_no:
        title: Phone No.
        description: The "from" phone number where WhatsApp messages are sent from.
        type: string
        pattern: '^\+\d{5,}$'
    #end properties
  #end smooch

  smtp:
    title: SMTP
    description: Provider settings for sending emails using SMTP. TLS is always assumed.

    type: object
    additionalProperties: false
    required: [server_uri]

    properties:
      server_uri:
        title: Server URI
        description: SMTP server URI of the form `smtp://username:password@hostname:[port]`. Port defaults to 465.

        type: string
        minLength: 1
      #end for

      from:
        title: From
        description: "The `From` email when sending emails through this provider. Defaults to `Bot MD <noreply@botmd.io>`."

        type: string
        minLength: 1
      #end for

      allowed_incoming:
        title: Allowed Incoming
        description: The list of sender email addressmtp this provider will allow.
        type: array
        minItems: 1

        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
        #end items
      #end allowed_incoming

      allowed_outgoing:
        title: Allowed Outgoing
        description: The list of email addresses this provider will deliver to.
        type: array
        minItems: 1

        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
        #end items
      #end allowed_outgoing

      denied_incoming:
        title: Denied Incoming
        description: Array of emails that are denied for incoming messages. If set, any emails not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
      #end denied_incoming

      denied_outgoing:
        title: Denied Outgoing
        description: Array of emails that are denied for outgoing messages. If set, any emails not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          anyOf:
            - format: email
            - format: idn-email
      #end denied_outgoing

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
    #end properties
  #end smtp

  telegram:
    title: Telegram
    description: Provider settings for Telegram.

    type: object
    additionalProperties: false
    required: [username, api_token]
    properties:
      username:
        title: Username
        description: The Telegram bot's username.
        type: string
        minLength: 1

      api_token:
        title: API Token
        description: The API token for accessing Telegram API.
        type: string
        minLength: 1

      allowed_incoming:
        title: Allowed Incoming
        description: The list of usernames this provider will allow.
        type: array
        minItems: 1

        items:
          type: string
          minLength: 1
        #end items
      #end allowed_incoming

      allowed_outgoing:
        title: Allowed Outgoing
        description: The list of usernames this provider will deliver to.
        type: array
        minItems: 1

        items:
          type: string
          minLength: 1
        #end items
      #end allowed_outgoing

      denied_incoming:
        title: Denied Incoming
        description: Array of usernames that are denied for incoming messages. If set, any usernames not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          minLength: 1
      #end denied_incoming

      denied_outgoing:
        title: Denied Outgoing
        description: Array of usernames that are denied for outgoing messages. If set, any usernames not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          minLength: 1
      #end denied_outgoing

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
    #end properties
  #end telegram

  twilio:
    title: Twilio
    description: Provider settings for Twilio.

    type: object
    additionalProperties: false
    required: [account_sid, api_key, api_secret, phone_no, auth_token]
    properties:
      account_sid:
        title: App ID
        description: The Twilio `account_sid`.
        type: string
        minLength: 1

      phone_no:
        title: Phone Number
        description: The phone number Twilio will use to send SMS/WhatsApp messages .
        type: string
        pattern: '^\+\d{5,}$'

      api_key:
        title: Key
        description: The Twilio API `key`.
        type: string
        minLength: 1

      api_secret:
        title: Secret
        description: The Twilio API `secret`.
        type: string
        minLength: 1

      auth_token:
        title: Auth Token
        description: The `auth_token` is used for validation of incoming webhook requests.
        type: string
        minLength: 1

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1
      #end retry_attempts_limit

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      #end retry_seconds_ahead
    #end properties
  #end twilio

  viber:
    title: viber
    description: Provider settings for viber.

    type: object
    additionalProperties: false
    required: [name, uri, token]
    properties:
      avatar:
        name: Avatar
        description: The sender’s avatar URL. Avatar size should be no more than 100 kb. Recommended 720x720
        type: string
        minLength: 1

      name:
        name: Name
        description: The sender’s name to display
        type: string
        minLength: 1

      token:
        title: Token
        description: The viber `token`.
        type: string
        minLength: 1

      uri:
        name: URI
        description: bot's URI generated by viber. It can be found in the your bot’s Admin Panel or in the response to the get-account-info API request.
        type: string
        minLength: 1

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1
      #end retry_attempts_limit

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30
      #end retry_seconds_ahead
    #end properties
  #end viber

  whatsapp:
    title: WhatsApp
    description: Provider settings for WhatsApp by Meta.

    type: object
    additionalProperties: false
    required: [waba_id, app_secret, access_token, phone_no_id, phone_no, verify_token]
    properties:
      waba_id:
        title: WhatsApp Business Account ID
        description: The WhatsApp business account ID associated with this provider. Get it from [Meta for Developers](https://developers.facebook.com/) under App -> WhatsApp -> Getting Started.
        type: string
        pattern: '^\d{5,}$'

      app_secret:
        title: App Secret
        description: App secret for verifying payload signature and various other uses. Found in [Meta for Developers](https://developers.facebook.com/) under `Settings > Basic`.
        type: string
        minLength: 1

      access_token:
        title: Access Token
        description: Access token for use with the Graph API. Access tokens should be assigned to System Users and be permanent. See instructions at [here](https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login) to create one.
        type: string
        minLength: 1

      namespace:
        title: Namespace
        description: WhatsApp namespace associated with this WABA.
        type: string
        minLength: 1

      phone_no_id:
        title: Phone No. ID
        description: The ID associated with the WhatsApp Business phone number. Get it from [Meta for Developers](https://developers.facebook.com/) under App -> WhatsApp -> Getting Started.
        type: string
        pattern: '^\d{5,}$'

      phone_no:
        title: Phone No.
        description: The phone number where we will send WhatsApp messages from. Get it from [Meta for Developers](https://developers.facebook.com/) under App -> WhatsApp -> Getting Started.
        type: string
        pattern: '^\+\d{5,}$'

      verify_token:
        title: Verify Token
        description: Token for verifying webhook challenge. You choose this and set this in [Meta for Developers](https://developers.facebook.com/) under `App > WhatsApp > Configure Webhook`.
        type: string
        minLength: 1

      retry_attempts_limit:
        title: Retry Attempts Limit
        description: Number of times to retry sending a message before giving up.
        type: integer
        minimum: 1

      retry_seconds_ahead:
        title: Retry Seconds Ahead
        description: Number of seconds to wait before retrying sending a message.
        type: integer
        minimum: 30

      read_timeout:
        title: Read Timeout
        description: Number of seconds to wait before giving up on sending a message.
        type: integer
        minimum: 5

      connect_timeout:
        title: Connect Timeout
        description: Number of seconds to wait before giving up on connecting to WhatsApp API.
        type: integer
        minimum: 3
    #end properties
  #end twilio

  action_state:
    title: Action State
    description: Provider settings for `ActionState` support.

    type: object
    additionalProperties: false
    required: []
    properties:
      is_enabled:
        title: Is Enabled
        description: Whether action state handling is enabled on this provider. Defaults to value of provider class variable `use_action_state`.
        type: boolean

      expiry_seconds:
        title: Expiry Seconds
        description: Number of seconds for action state IDs before they are invalid. Defaults to 3600 seconds.
        type: number
    #end properties
  #end action_state

  billing:
    title: Billing
    description: Settings related to billing.

    type: object
    additionalProperties: false
    required: []

    properties:
      ignored_devices:
        title: Ignored Devices
        description: Devices to ignore for billing purposes. Can be either UID or device identifier.

        type: array
        minItems: 1
        items:
          type: string
          minLength: 1
    #end properties
  #end billing

  fcm:
    title: FCM
    description: Provider settings for Firebase Cloud Messaging.

    type: object
    additionalProperties: false
    oneOf:
      - required: [api_key]
      - required: [credentials]
    properties:
      api_key:
        title: API Key
        description: The FCM server API key for authenticating against FCM.
        type: string
        minLength: 1
      credentials:
        title: Google Cloud Credentials
        description: GCP service account credentials
        type: object
        required: [type, private_key, private_key_id, project_id]
        additionalProperties: true

        properties:
          type:
            title: Type
            description: Credential type. Must be `service_account`
            const: service_account

          project_id:
            title: Project ID
            description: Project ID this credential corresponds to
            type: string
            minLength: 1

          private_key_id:
            title: Private Key ID
            description: Private key unique ID associated with this credential
            type: string
            minLength: 1

          private_key:
            title: Private Key
            description: Private key associated with the credential
            type: string
            minLength: 1
    #end properties
  #end fcm

  phone:
    title: Phone-based
    description: Provider settings for providers inheriting from `PhoneBasedProviderMixin`.

    type: object
    additionalProperties: false
    required: []
    properties:
      allow_short_code:
        title: Allow Short Code
        description: Whether to allow incoming/outgoing deliveries to [short codes](https://en.wikipedia.org/wiki/Short_code) (usually SMS). Defaults to `false`.
        type: boolean

      allowed_incoming:
        title: Allowed Incoming
        description: Array of numbers that are allowed for incoming messages. If set, any numbers not in this list will be denied.
        type: array
        minItems: 1
        items:
          type: string
          pattern: '^\+\d{5,}$'

      allowed_outgoing:
        title: Allowed Outgoing
        description: Array of numbers that are allowed for outgoing messages. If set, any numbers not in this list will be denied.
        type: array
        minItems: 1
        items:
          type: string
          pattern: '^\+\d{5,}$'

      denied_incoming:
        title: Denied Incoming
        description: Array of numbers that are denied for incoming messages. If set, any numbers not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          pattern: '^\+\d{5,}$'

      denied_outgoing:
        title: Denied Outgoing
        description: Array of numbers that are denied for outgoing messages. If set, any numbers not in this list will be allowed.
        type: array
        minItems: 1
        items:
          type: string
          pattern: '^\+\d{5,}$'
    #end properties
  #end phone

  ratatoskr:
    title: Ratatoskr
    description: Settings related to Ratatoskr.

    type: object
    additionalProperties: false
    required: []

    properties:
      send_technical_error_message:
        title: Send Technical Error Message
        description: Send a technical error message whenever we encounter an unhandled provider/application level exception. Defaults to `true`.
        type: boolean

      technical_error_messages:
        title: Technical Error Messages
        description: >-
          The content of the technical error message to send. Defaults to: `Sorry! I am currently experiencing technical issues. Don't worry, our team is on it!` if not set.
        $ref: "MessageTemplate.schema"
    #end properties
  #end ratatoskr
#end definitions

[Main Page] [Schema Documentation] [Examples]