Skip to main content
POST
Error

Autorizaciones

Authorization
string
header
requerido

Bearer authentication. Send Authorization: Bearer .

Cuerpo

application/json

Provider Input

ProviderInput payload

category
string
requerido
name
string
requerido
type
string
requerido

Type is the provider type. For Category=SMS the canonical Casdoor value is "Twilio SMS"; the legacy "Twilio" is still accepted and is normalised to the canonical form before the provider is stored.

appId
string
clientId
string

ClientId is the FROM ADDRESS for Category=Email — required, and must be a valid email address verified with the provider (a SendGrid Sender Identity). Casdoor sends every email from this value; a provider without it cannot send at all. For Category=OAuth it is the OAuth client ID, and for Category=SMS the provider account identifier (a Twilio Account SID).

Ejemplo:

"noreply@example.com"

clientId2
string
clientSecret
string

#nosec G117 -- auth service, field must be in JSON response

clientSecret2
string

#nosec G117 -- auth service, field must be in JSON response

content
string

Content is the HTML body of the verification-code email for Category=Email. Casdoor substitutes the code into a single %s, so the body must contain exactly one. A neutral default body is applied when omitted.

customAuthUrl
string
customTokenUrl
string
customUserInfoUrl
string
disableSsl
boolean
domain
string
endpoint
string
host
string
intranetEndpoint
string
issuerUrl
string
method
string
port
integer
receiver
string
regionId
string
scopes
string
signName
string
subType
string
templateCode
string
title
string

Title is the subject line of the verification-code email for Category=Email. Defaults to "Here is your code" when omitted.

Respuesta

Created

ProviderResponse payload

appId
string
category
string
Ejemplo:

"Email"

clientId
string
clientId2
string
content
string
createdAt
string
Ejemplo:

"2021-09-01T00:00:00.000Z"

customAuthUrl
string
customTokenUrl
string
customUserInfoUrl
string
disableSsl
boolean
domain
string
endpoint
string
host
string
id
string
Ejemplo:

"00000000-0000-0000-0000-000000000000"

intranetEndpoint
string
issuerUrl
string
method
string
name
string
Ejemplo:

"SMTP Corp"

port
integer
providerUrl
string
receiver
string
regionId
string
scopes
string
signName
string
subType
string
templateCode
string
title
string
type
string

Type is the provider type exactly as stored in Casdoor. SMS providers created before the canonical "Twilio SMS" was adopted are still stored as "Twilio", so both values can appear here.

Ejemplo:

"SendGrid"