Basic info
- Title
- Gmail
- Image
- /file/setup~cross_shared_collection/57b62751ad981536c10001f1/image/
- Name
- gmail
- Summary
- A Gmail API Wrapper
- Readme
-
Quick Start
To try your Gmail Collection:
1. Authorize your Gmail API OAuth 2.0 authorization, if you have not done so.
2. Create a new MIME Message.
And that's all, the message you created have been sent using your authorized Google account.
Using CenitHub API
MIME messages are available at https://cenit.io/api/v1/mime/message.
To POST a message to this URL just format a JSON document like this
{ "to": "support@cenit.io", "subject": "Hello", "body": "Just to say hello!", "attachments": [ { "filename": "file.txt", "data": "Sent through CenitHub API" } ] }
You can try it with the following CURL command
curl -H "Content-Type: application/json"\ -H "X-User-Access-Key: XXXXXXX"\ -H "X-User-Access-Token: XXXXXXXXXXXXXXXX"\ -X POST -d '{"to":"support@cenit.io","subject":"Hello","body":"Just to say hello!","attachments":[{"filename":"file.txt","data":"Sent through CenitHub API"}]}'\ https://cenit.io/api/v1/mime/message
You can POST messages also in XML format
<?xml version="1.0"?> <Message> <to>support@cenit.io</to> <subject>Hello</subject> <body>Just to say hello!</body> <Attachment> <filename>file.txt</filename> <data>Sent through CenitHub API</data> </Attachment> </Message>
If you want to attach binary files you can encode them and specify the encoding format like this
{ "to": "support@cenit.io", "subject": "See attachment", "attachments": [ { "filename": "file.txt", "encoding": "urlsafe_base64", "data": "U2VudCB0aHJvdWdoIENlbml0SHViIEFQSQ==" } ] }
The availables encoding formats are
- base64
- strict_base64
- urlsafe_base64
About Attachments
Attachments are stored in a separate file data type and they are available at https://cenit.io/api/v1/mime/attachment. If you have the ID of a file already stored on that model then you can attach it to a message by simple reference
{ "to": "support@cenit.io", "subject": "See attachment", "attachments": [ { "_reference": true, "id": "abcoie90w344965n56n54nm6" } ] }
Note that the 'attachments' property value is an array, so you can attach more than one file.
Restful API
You have a complete set of actions over your data in Cenit.
Retrieve a list of messages
curl -H "Content-Type: application/json"\ -H "X-User-Access-Key: XXXXXXX"\ -H "X-User-Access-Token: XXXXXXXXXXXXXXXX"\ -X GET https://cenit.io/api/v1/mime/message
Show a message by id
curl -H "Content-Type: application/json"\ -H "X-User-Access-Key: XXXXXXX"\ -H "X-User-Access-Token: XXXXXXXXXXXXXXXX"\ -X GET https://cenit.io/api/v1/mime/message/XXXXXXXXXXXXXXX
- Categories
-
Id Title Description Updated at email Email Electronic mail services including storage, delivery and analysis December 01, 2016 17:06 1 Categories -
Name Email Cenithub Team macarci@gmail.com 1 Cross collection authors - Pull count
- 192
- Id
- 57b62751ad981536c10001f1
- Created at
- August 18, 2016 21:23
- Updated at
- October 02, 2018 15:28
Compute
- Translators
-
Namespace Name Type Updated at Gmail MIME To Gmail API V1 Message Export October 27, 2016 15:52 1 Transformations - Algorithms
-
Namespace Name Description Language Tags Updated at MIME to_rfc822 Convert a message into a RFC822 format Ruby October 29, 2018 20:11 1 Algorithms - Snippets
-
Namespace Name Type Description Updated at Gmail MIME_To_Gmail_API_V1_Message.rb Ruby - February 06, 2022 07:37 MIME Message.json JavaScript - February 06, 2022 07:28 MIME to_rfc822.rb Ruby - February 06, 2022 07:28 3 Snippets
Workflows
- Flows
-
Namespace Name Active Event Translator Updated at Gmail Send Created Message ‒ Gmail | MIME To Gmail API V1 Message [Shared] November 12, 2019 15:37 1 Flows - Events
-
Namespace Name Type Updated at MIME Message Created Observer - 1 Events
Connectors
- Connections
-
Namespace Name Url Key Token Authorization Updated at Gmail API v1 Connection https://www.googleapis.com/gmail/v1/users October 29, 2018 19:01 1 Connections - Webhooks
-
Namespace Name Path Method Description Authorization Updated at Gmail API v1 POST {userid} Messages Send /{{userId}}/messages/send post Sends the specified message to the recipients in the To, Cc, and Bcc headers. October 27, 2016 18:37 1 Webhooks - Connection Roles
-
Namespace Name Webhooks Connections Updated at Gmail Connections Gmail API v1 | Connection [Shared] - 1 Connection Roles
Data
- Data Types
-
Namespace Name Slug Type Storage size Updated at MIME Attachment attachment File Data Type 0 Bytes November 12, 2019 15:37 MIME Message - Json Data Type 0 Bytes November 28, 2018 20:52 2 Data Types
Security
-
Namespace Name Status Type Metadata Updated at Gmail API v1 Authorization Unauthorized Oauth 2 Authorization - 1 Authorizations - OAuth Clients
-
Provider Name Identifier Secret Request token parameters Request token headers Template parameters Updated at Cenit | Google [Shared] CenitSaaS January 06, 2022 22:15 1 Remote OAuth Clients - OAuth Providers
-
Namespace Name Type Authorization endpoint Cenit Google Oauth 2 Provider https://accounts.google.com/o/oauth2/auth 1 Providers - OAuth 2.0 Scopes
-
Provider Name Description Updated at Cenit | Google [Shared] https://www.googleapis.com/auth/gmail.send Send email on your behalf February 21, 2022 15:07 1 OAuth 2.0 Scopes
Config
- Namespaces
-
Name Slug Updated at MIME mime November 25, 2017 10:39 Gmail API v1 gmail_api_v1 - Gmail gmail - Cenit cenit - 4 Namespaces