Deskhero Developer Hub
Back to deskhero.com
Mailboxes

Oauth validate

Checks that a just completed OAuth flow, identified by the temporary identifier it produced, can really serve a mailbox: the account is read, the latest messages are fetched and a real test message is sent from the address to a Deskhero delivery test address. Nothing is stored, the temporary tokens live in a short lived cache so this has to run soon after the OAuth flow, and the response names the authorized account and the resolved address or the step that failed.

POST /api/{tenant:minlength(2)}/v{version:apiVersion}/mailboxes/oauth_validate
Authorisation
Minimum role: ADMIN

Request arguments

Name Type Source
inputDTO_mailbox_oauth2_validation_inputBody
Request body example

Response

Status
200 (OK)
Type
DTO_mailbox_oauth2_validation_response[]
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest), 403 (Forbidden)
Response body example
DTO_mailbox_oauth2_validation_input
NameTypeReadOnlyDescription
identifierStringIdentifier
emailStringOptional. If the user has multiple mailboxes, this is the mailbox that the user wants to use.
DTO_mailbox_oauth2_validation_response
NameTypeReadOnlyDescription
successBooleanSuccess
emailStringEmail
error_messageStringError message
authorized_accountStringAuthorized account

Generated Aug 4, 2026 18:37