3.4.2 Gmail
Last updated
Last updated
This data source is not available in your deployments. You will not find it in your settings, please reach out to support@ushahidi.com or our chat messenger to enable it in your deployment.
This section allows you to set up the platform to receive and send emails through a connected Gmail account via the API. Before getting started, make sure that you have an email account set up on Gmail. Note: If you're self hosting the Ushahidi platform, the Gmail Provider makes use of the server-side flow when making a request to Gmail API, and must be authorized using OAuth 2.0 Credentials.
Follow this guide to create the OAuth 2.0 Credentials (Client ID and Client Secret) with Gmail. Keep in mind:
Select "where you will be calling the API from" as Other UI.
Select User data as the data type to be accessed.
Select your application type as TVs and Limited Input devices.
There's a need to set up a consent screen.
To get started with Gmail set up on the Ushahidi platform, click on Gmail from the drop down as shown below.
Input the following email account settings
Email Address: Enter the Gmail address you will be receiving and sending emails with.
Fetch Email From: Pick the date you want to start fetching messages from.
Client Id: Enter the Gmail client id gotten from the OAuth credentials.
Client Secret: Enter the Gmail client secret gotten from the OAuth credentials.
Redirect URL: Enter the redirect URL from the OAuth credentials. The default value set here is urn:ietf:wg:oauth:2.0:oob
and in most cases should be left this way.
Click on Save and this data source’s settings will be saved.
The below setup will be available to both the hosted and self-hosted users.
Next, Scroll up and click on Connect your Gmail Account and this will show a google prompt to authenticate your Gmail account.
Follow the prompt through and click on Allow to be presented with the list of Gmail accounts that you have.
Grant permission by selecting the Gmail account that you would like the Ushahidi platform to access.
This will display an auth code.
Please copy the provided code, switch back to your Ushahidi application, and paste/enter it on the opened modal:
Enter the point in time that you would like the Ushahidi platform to fetch messages from your inbox.
Click on Authorize to save the auth code and date entered.
A message will be displayed in your deployment to indicate that your account is connected, messages from Gmail will now be pulled into the platform via the API.
To disconnect your account, simply click on Disconnect your Gmail account to stop all messages from being fetched from your inbox.
NB: All messages that were previously fetched will not be deleted from your deployment.
To enable/disable the email data source, simply click on the green toggle and click on save.