Documentation Index

Fetch the complete documentation index at: https://docs.algosolutions.com/llms.txt

Use this file to discover all available pages before exploring further.

Example: OAuth Configuration for Google Docs

Prev Next

This guide explains how to:

  • Integrate an Algo device with Google Docs using OAuth

  • Verify the configuration by creating a test file in Google Drive

  • Use the OAuth profile to create a test file in Google Drive from an Algo 8450

Note

This document includes third-party configuration procedures that are subject to change. It is provided for reference purposes only, and Algo cannot guarantee that the screenshots or procedures will always be current or up to date.

Before you start

Ensure you have a Google account that is connected to Google Drive

Procedure Overview

This procedure includes the following steps:

  1. Creating a Google Cloud OAuth Project

  2. Creating an OAuth Authorization Profile

  3. Creating a Test Document

  4. (Optional): Configuring an 8450 Button to Create a Google Drive File


Creating a Google Cloud OAuth Project

Create a Google Cloud OAuth project and obtain the required credentials for OAuth.

  1. Sign in to the Google Cloud Console.

  2. Click Select a project.

  3. Select New project.

  4. Enter a name for your project, then select Create.

  5. In the notification window, click Select Project below your project name.

  6. Select APIs & ServicesEnabled APIs & services.

  7. Select Enable APIs and services from the navigation menu.

  8. Search Google Drive API to locate it.

  9. Select Google Drive API

  10. Select Enable.

  11. Select Credentials + Create credentials OAuth client ID.

  12. Select Configure consent screen.

  13. Select Get started.

  14. Follow the on-screen instructions to configure your project, then select Create.

    • App Information

      • App name: Enter a name for your application.

      • User support email: Enter an email for users to contact you with questions about their consent.

    • Audience: Set to External.

      This makes the application available to any test user with a Google Account.

    • Contact Information: Enter your email for Google to notify you about any changes to this project.

    • Finish: Accept the Google API services user data policy.

  15. Select Create OAuth client.

  16. Configure the following, then select Create.

    • Application type: Set to TVs and Limited Input devices.

    • Name: Enter a name.

  17. Copy the Client ID and Client secret.

    You need this information to configure OAuth later.

  18. Go to Audience + Add users.

    Add your Google account as a test user to access the project.

  19. Enter the same email you used to sign in to Google Cloud Console. Then select Save.

Creating an OAuth Authorization Profile

Create an OAuth profile to store your Google Docs authentication settings.

Ensure you have the following:

  • Client ID

  • Client Secret

To create a Google Docs OAuth Profile:

  1. Log in to your device’s web interface using HTTPS.

    HTTPS is required by the Google Docs OAuth process.

  2. Go to the Advanced SettingsOAuth.

  3. Set a Name for your OAuth profile.

  4. Select GOOGLE_DOCS as the Provider Type.

  5. Accept the following automatically populated values:

  6. Set the following:

    • Client ID: Enter your OAuth Client ID.

    • Client Secret: Enter your OAuth Client Secret.

  7. Select START AUTHORIZATION.

  8. Copy the User code that appears on the right of the START AUTHORIZATION button.

    You need this code to connect your device to Google Docs.

  9. Go to https://www.google.com/device.

  10. Enter your user code and select Continue.

  11. Select your Google account.

  12. Select Continue to verify the application.

  13. Select Continue.

    Upon success, the following screen appears:

  14. Go back to your Algo device’s web interface and select Create Profile.

    Your profile appears under the OAuth Profiles list.

Creating a Test Document

You can create a test meeting to verify that the configuration is working correctly.

To create a file in Google Drive:

  1. Log in to your device’s web interface using HTTPS.

    HTTPS is required by Google Docs OAuth process.

  2. Go to the Advanced SettingsOAuth.

  3. Select your Google Docs profile from the Test OAuth Profile dropdown list.

  4. Select GOOGLE_DOCS as the Provider Type Template.

  5. Accept the following default settings:

  6. Select RUN OAuth Test.

    Upon success:

    • The document oauth-test.txt appears in your Google Drive’s My Drive section.


      A successful response is displayed.

Configuring an 8450 Button to Create a Google Drive File

You can configure a button on the Algo 8450 to create a Google Drive file.

To configure an 8450 button to create a Google Docs meeting:

  1. Create a button on an 8450 screen.

  2. Set the Button Status to Enabled.

  3. Configure the following:

    • Text: Enter the button display text.

    • Action: Set to Send API Request.

    • Number of API Requests: Set to 1.

    • Request 1 - Command: Set to Other.

    • Request 1 - Method: Set to POST.

    • Request 1 - Custom Path: Set to upload/drive/v3/files.

    • Request 1 - Targets: Set to www.googleapis.com.

    • Request 1 - OAuth Profile: Select your Google Docs profile.

    • Request 1 - Headers: Set to Custom Headers.

    • Request 1 - Custom Headers: Set to Content-Type: application/json; charset=utf-8.

    • Request 1 - Data Payload:

      Hello
  4. Select Save.

    Press the button and verify that the file is created in your Google Docs’ My Drive section.

Troubleshooting

I get a 502 error when I run the OAuth Test

You may be logged out of the device’s web interface. Log in again and retry.

After I run the “Start Authorization” again, my OAuth Test fails

Each time you run Start Authorization again, select Update Profile to save the new credentials before running the test.

My OAuth profile stops working.

An OAuth profile can stop working if the OAuth provider rejects or invalidates the access or refresh token. Refer to the OAuth provider’s documentation for more information. If this occurs, the OAuth profile must be reauthorized.