Swarmhit's own. The app the engine refreshes your Google or Microsoft mailboxes' tokens with (kind: oauth), or one that reaches a domain's mailboxes itself (kind: service: Google domain-wide delegation with service_client and service_key; Microsoft app-only with tenant_id). route: api uses the Gmail API / Graph, imap IMAP and SMTP. The secrets go to the engine only and are never answered.
Your API key from the console (gw_live_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/email/api/v1/oauth_apps" \ -H "Content-Type: application/json" \ -d '{ "provider": "GOOGLE", "kind": "oauth", "route": "api", "name": "Acme Google", "client_id": "1234-example.apps.googleusercontent.com", "client_secret": "GOCSPX-example" }'{ "object": "OAuthApp", "id": "string", "provider": "GOOGLE", "kind": "oauth", "route": "imap", "name": "string", "tenant_id": "string", "created_at": "2019-08-24T14:15:22Z", "adopted": true}Mark read or unread, or move an email PUT
`unread` wins over everything else. `folders`: one folder name for IMAP and Outlook (a move; the email's id changes with its folder, the new one is `gateway.email_id`). On Gmail, the folder names (as `folders` lists them; a system label such as `\Starred` as it is) become the mail's labels: the ones named are added; of the others, only user labels and INBOX, Trash and Spam are removed. Important, Starred, Draft and Sent stay unless named; All Mail is no label.
Delete an OAuth app DELETE
409 while a mailbox still uses it.