メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
emails
/
provider
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    emails "github.com/auth0/go-auth0/management/management/emails"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &emails.GetEmailProviderRequestParameters{
        Fields: management.String(
            "fields",
        ),
        IncludeFields: management.Bool(
            true,
        ),
    }
    client.Emails.Provider.Get(
        context.TODO(),
        request,
    )
}
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.emails.provider.get({
fields: "fields",
includeFields: true,
});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.emails.provider.get({
fields: "fields",
includeFields: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/emails/provider \
--header 'Authorization: Bearer <token>'
import requests

url = "https://{tenantDomain}/api/v2/emails/provider"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/emails/provider",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/emails/provider")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/emails/provider")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "name": "sendgrid",
  "enabled": true,
  "default_from_address": "<string>",
  "credentials": {
    "api_user": "<string>",
    "region": "<string>",
    "smtp_host": "<string>",
    "smtp_port": 123,
    "smtp_user": "<string>"
  },
  "settings": {}
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

クエリパラメータ

fields
string

Comma-separated list of fields to include or exclude (dependent upon include_fields) from the result. Leave empty to retrieve name and enabled. Additional fields available include credentials, default_from_address, and settings.

include_fields
boolean

Whether specified fields are to be included (true) or excluded (false).

レスポンス

Email provider successfully retrieved.

name
string
デフォルト:sendgrid

Name of the email provider. Can be mailgun, mandrill, sendgrid, resend, ses, sparkpost, smtp, azure_cs, ms365, or custom.

enabled
boolean
デフォルト:true

Whether the provider is enabled (true) or disabled (false).

default_from_address
string

Email address to use as "from" when no other address specified.

credentials
object

Credentials required to use the provider.

settings
object

Specific provider setting