Views: 4074
Last Modified: 12.10.2021

Note: With time, app registration wizards for social services can change external appearance via updates. The present lessons may not display the latest changes.

  Getting Client ID and Client secret

For Google OAuth 2.0, specify Client ID and Client secret parameters in settings for Social Website Integration module (Settings > System Settings > Module Settings > Social Website Integration), and a special link in service settings.

You can obtain unique Client ID and Client secret at the Google Developers Console.

To do this, the following is required:

  1. Create new project using the button Create project at the page Manage resources.

  2. Select a project from a list , if you not forwarded automatically to the newly created project:
  3. Then, got to the Credentials menu, click on the button Create credentials and select OAuth client ID
  4. You may have to Configure Consent Screen OAuth

  5. Then, select type of application - in this case it is Web client, and enter the necessary data for your site in the fields:
    • Name - can be arbitrary,
    • Authorized JavaScript origins - you site URL,
    • Authorized redirect URLs - address from https://www.mysite.com/bitrix/tools/oauth/google.php Social Website Integration settings and redirect URL https://www.mysite.com/bitrix/tools/mail_oauth.php .

    Note: Please note, you may enter several addresses into Authorized redirect URLs , which allows using single application on several sites/domains.

  6. After clicking Create button at the page, the requested Client ID () and Client secret , which must be entered in the Social Website Integration module settings (Settings > System Settings > Module Settings > Social Website Integration ).
  7. Client secret can always be found by clicking on Client ID in the list.

  Other API permissions

For Bitrix24 modules to operate correctly jointly with Google services, you may need other API permissions.

For example, when you need to synchronize Bitrix24 Calendar with Google.Calendar, as mentioned in Social Website Integration settings . Additionally, if you need to integrate Bitrix24.Drive and display hints from Google in the "Address" fieldFor company details to automatically show hints from Google in the "Address" field or to indicate address directly on the map, you'll need 2 keys in company details within Bitrix24 and etc.

To add permissions in Google.APIs console:

  • Create new or correct already existing API key
  • Indicate available type of applications, forwarding source (your site URL) and checkmark the available API in the list:

  • When the list doesn't have the services that you need, use the string Search products and resources
  • And enable the found API


0


Courses developed by Bitrix24