Test Config Without Account Email Settings Update
Use this API to test an Email Settings config without updating the account Email Settings configuration.
Resource URL
https://<subdomain>/api/2/branding/email_settings/test
Header Parameters
Authorization required string | Set to Set The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: |
Content-Type required string |
Set to application/json . |
Sample Email
Below is an example of a test email, verify that it’s sent from the correct domain.
Request Parameters
address | string | Required. Email Settings server address |
domain | string | Required. Domain of the From address. |
from | string | Required. The From email address in the message. |
port | integer | Optional. Defaults to 2.5. |
user_name | string | Optional. The user name of the account to authenticate with the Email Settings server. |
password | string | Optional. The password of the account to authenticate with the Email Settings server. |
use_tls | boolean | Optional. Defaults to true . |
Sample Request Body
{
"address": "smtp.sendgrid.net",
"use_tls": true,
"from": "email@example.com",
"domain": "example.com",
"user_name": "user-name",
"password": "password",
"port": 587
}
Sample Responses
- 200 Ok
- 401 Unauthorized
- 500
{
"message": "Success",
"statusCode": 200,
"name": "Success"
}
Typically, this error means that your Authorization
header value is missing or incorrectly formatted. The Authorization
header value should use this format: bearer:<access_token>
.
{
"message": "Unauthorized",
"statusCode": 401,
"name": "UnauthorizedError"
}
{
"message": "535 Authentication failed: The provided authorization grant is invalid, expired, or revoked\n",
"statusCode": 500,
"name": "InternalServerError"
}
Postman Collection
Replace sample variables indicated by {{ }}
with your actual values.
Download for the Branding API
Sample Code
cURL
Replace sample values indicated by < >
with your actual values.
Test Config Without Account Email Settings Update
curl 'https://<subdomain>/api/2/branding/email_settings/test' \
-X PUT \
-H "Authorization: bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"address": ""smtp.sendgrid.net",
"domain": "example.com",
"from": "email@example.com"
}'
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.