With GMail API, it is possible to insert
a message to inbox with https://developers.google.com/gmail/api/v1/reference/users/messages/insert
The problem I face is when using insert
, messages do not appear in INBOX and user has to go to 'All Mail' in order to see them.
What is the best way to insert
messages into INBOX? Import?
You can set the request body based from the documentation:
Request Body: {
"raw": "string" // required property
"labelIds": "["INBOX"]" // add this optional property
"threadId": "string"
}
Here's the complete list for Type of Message labels.