Skip to content

Configure third-party email service

Configure third-party email service

Method name

AuthenticationClient.config_email_provider

Request parameters

NameTypeIs it requiredDefault valueDescriptionSample value
typestringYes-Third-party email service provider type:
- custom: Custom SMTP Mail service
- ali: Ali Enterprise Mailbox
- qq: Tencent Enterprise Mailbox
- sendgrid: SendGrid Mail Service
custom
enabledbooleanyes-Whether to enable. If not enabled, the built-in mail service of GenAuth will be used by defaulttrue
smtpConfig<a SMTPEmailProviderConfigInputno-SMTP mail service configuration
sendGridConfig<a SendGridEmailProviderConfigInputno-SendGrid mail service configuration
aliExmailConfig<a AliExmailEmailProviderConfigInputNo-Ali Enterprise Email Service Configuration
tencentExmailConfig<a TencentExmailEmailProviderConfigInputNo-Tencent Enterprise Email Service Configuration

Request Response

Type: EmailProviderRespDto

NameTypeDescription
statusCodenumberBusiness status code, which can be used to determine whether the operation is successful, 200 means success.
messagestringDescription
apiCodenumberSegmented error code, which can be used to get the specific error type.
requestIdstringRequest ID. It will be returned when the request fails.
data<a EmailProviderDtoResponse data

Sample result:

json
{
  "statusCode": 200,
  "message": "Success",
  "requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
  "data": {
    "enabled": true,
    "type": "custom",
    "smtpConfig": {
      "smtp_host": "smtp.example.com",
      "smtp_port": 465,
      "sender": "test",
      "senderPass": "passw0rd",
      "secure": true
    },
    "sendGridConfig": {
      "sender": "test",
      "apikey": "xxxxxxxxxx"
    },
    "aliExmailConfig": {
      "sender": "test",
      "senderPass": "passw0rd"
    },
    "tencentExmailConfig": {
      "sender": "test",
      "senderPass": "passw0rd"
    }
  }
}

Data Structure

SMTPEmailProviderConfigInput

NameTypeIs this field required?DescriptionSample value
smtp_hoststringyesSMTP addresssmtp.example.com
smtp_portnumberyesSMTP port465
senderstringnoUsernametest
senderPassstringyesPasswordpassw0rd
securebooleannoIs SSL enabled?true

SendGridEmailProviderConfigInput

NameTypeRequiredDescriptionSample value
senderstringyesUsernametest
apikeystringyesSendGrid API Key, see the SendGrid documentation for details.xxxxxxxxxx

AliExmailEmailProviderConfigInput

NameTypeIs it requiredDescriptionSample value
senderstringYesUsernametest
senderPassstringYesPasswordpassw0rd

TencentExmailEmailProviderConfigInput

NameTypeIs it requiredDescriptionExample value
senderstringyesusernametest
senderPassstringyespasswordpassw0rd

EmailProviderDto

NameTypeIs it required?DescriptionSample value
enabledbooleanyesWhether to enable. If not enabled, the built-in mail service of GenAuth will be used by defaulttrue
typestringnoThird-party mail service provider type:
- custom: Custom SMTP mail service
- ali: Ali Enterprise Mailbox
- qq: Tencent Enterprise Mailbox
- sendgrid: SendGrid Mail Service
ali
smtpConfigNoSMTP mail service configuration Nested type: <a SMTPEmailProviderConfig.
sendGridConfigNoSendGrid mail service configuration Nested type: <a SendGridEmailProviderConfig.
aliExmailConfigNoAli enterprise mail service configuration Nested type: <a AliExmailEmailProviderConfig.
tencentExmailConfigNoTencent enterprise mail service configuration Nested type: <a TencentExmailEmailProviderConfig.

SMTPEmailProviderConfig

NameTypeRequiredDescriptionSample value
smtp_hoststringyesSMTP addresssmtp.example.com
smtp_portnumberyesSMTP port465
senderstringyesUsernametest
senderPassstringyesPasswordpassw0rd
securebooleanyesEnable SSLtrue

SendGridEmailProviderConfig

NameTypeRequiredDescriptionSample value
senderstringYesUsernametest
apikeystringYesSendGrid API Key, see the SendGrid documentation for details.xxxxxxxxxx

AliExmailEmailProviderConfig

NameTypeIs it required?DescriptionSample value
senderstringYesUsernametest
senderPassstringYesPasswordpassw0rd

TencentExmailEmailProviderConfig

NameTypeIs it required?DescriptionSample value
senderstringYesUsernametest
senderPassstringyespasswordpassw0rd

Agent infrastructure for identity, memory, and web action.