In order to allow Staffbase to securely access your organization’s Google Drive files or Google Calendars, you need to enable the Google Drive or Google Calendar API for Staffbase. During this process, you will create the client ID needed to configure the Google widget.
Prerequisites
- You need a Google Enterprise subscription
- You need admin rights for this Google account
Enabling the Google Drive API or the Google Calendar API for Staffbase
- Sign into the Google Cloud Platform.
- Navigate to Dashboard and click Create project.
The page to create a new project opens.
If you have already created at least one project, click on the project dropdown in the header and dialog will open from which you can create a new project. - Provide a name for your project. For example: staffbase-widget
- Select your organization from the dropdown menu.
- Select the location.
- Click Create.
You are redirected to the Dashboard and your new project will be automatically selected from the project dropdown menu.
- Click Enable APIs and services.
- Select one of the following depending on the Google widget for which you want to enable.
- Google Drive API: If you want to enable the API for the Google Drive widget.
- Google Calendar API: If you want to enable the API for the Google Calendar widget.
- Click Enable for the API you selected.
Creating an OAuth Consent Screen
After enabling the respective Google API, you must configure the OAuth consent screen that will allow users to sign in to their Google account from the Staffbase platform. This is the authentication screen users will see when signing in to their Google account through the Staffbase employee app for the first time.
- In the Google Cloud Platform, ensure the project for your Google widget is selected and navigate to OAuth consent screen.
- Under User Type, select Internal.
- Click Create.
- Under App Information provide:
- App name
- User support email
- App logo
- Under Developer contact information, provide the email address of your IT department.
- Click Save and continue.
- Click Add or remove scopes.
- Select the scopes depending on your requirement:
- For Google Drive: auth/drive.metadata.readonly
- For Google Calendar: auth/calendar.events.readonly
- Click Update.
- Click Save and continue.
You have configured the OAuth consent screen, and now see a summary of the configured settings.
Creating the Client ID
After configuring the scope of your project, you can set up the client ID. The client ID is needed to configure the Google widgets in the Staffbase platform and connect your organization’s Google account to the Staffbase environment.
- In the Google Cloud Platform, ensure the project for your Google Drive widget is selected and navigate to Credentials.
- Click Create credentials and then select OAuth client ID from the dropdown menu.
- Under Application type, select Web application from the dropdown menu.
- Under Name, provide a name for your client. For example, staffbase-widget-client.
- Under Authorized JavaScript origins, click Add URIs.
- Provide all possible URIs at which your employee app or intranet can be reached. For example, https://app.staffbase.com or https://staffbase.yourdomain.com.
- Click Create.
You’ve created your client ID. You can now copy this client ID and use it to configure the Google Drive widget.
Comments
0 comments
Please sign in to leave a comment.