Products

×

How to add Service Account ID and P12 File Path for Google Drive

To create the service account and P12 path, users need to follow a certain set of procedures which are shared below:-

  1. Create a Google Cloud Project
    • Using the credential of your G Suite account, log in to your Google Cloud platform.
    • google drive add service image
    • In the Google Cloud Platform go to the Home. Firstly, select a project and then click on the New Project option.
    • google drive add service image
    • Here, enter the details in the project name, organization, and location. Thereafter, click on the Create button.
    • google drive add service image
  2. Enable API & Services
    • Click on the APIs and services and then select the enables APIs and services option.
    • google drive add service image
    • Here, you need to choose the already created project and after that, click on the ENABLE APIS AND SERVICES option.
    • google drive add service image
    • Users need to locate for Admin SDK and Google Drive API in the search bar. Later on, enable them.
    • google drive add service image
  3. Create a Service Account
    • Open the menu where you need to look for IAM and admin. After finding them, click on it and choose Service accounts option.
    • google drive add service image
    • Here, click on Create Service Account option.
    • google drive add service image
    • Now fill up the required details in the Service account details and click on Create AND Continue.
    • Note:- You need to copy the service account ID which is highlighted in the image shared below. This service account ID will be used to login into the software.

      google drive add service image
    • Click on the second option, which is Grant this service account access to the project. Click on Select a role and assign a basic role as Owner.
    • google drive add service image
    • Provide the permission for service account users as well as admin roles, and click on Done.
    • google drive add service image

      Note:- Users should copy the Unique ID which will be used later in the Google Admin console.

    • Go to the IAM and admin and click on Service accounts. Click on already created email id as showing in the below image.
    • google drive add service image
    • Copy the Unique ID displaying here which will be used later.
    • google drive add service image
  4. Delegating Authority to the Service Account
    • In the Admin Console, click on Security option, and then on the API Controls option.
    • google drive add service image
    • Here, kindly click on the Manage Domain Wide Delegation button.
    • google drive add service image
    • In the Domain-wide delegation, click on the Add new option.
    • google drive add service image
    • Make sure to paste the Unique ID in the client ID field that you have earlier copied. Also, fill out the scopes in the given fields. Users can mention each scope in a different field or can also mention all of them in the same field by separating them by a comma. After entering them, click on the Authorise button. Those permissions are:-
    • https://www.googleapis.com/auth/drive.metadata.readonly,
    • https://www.googleapis.com/auth/drive.readonly,
    • https://www.googleapis.com/auth/drive.file,
    • https://www.googleapis.com/auth/admin.directory.user,
    • https://www.googleapis.com/auth/drive
    • google drive add service image
    • Go back to the Service accounts and click on the Key. Click on the Add Key, where a list will appear, and choose Create new key.
    • google drive add service image
    • On the service accounts settings option, click on Actions and select the Manage keys option.
    • 19th step image
    • Select the P12 option and click on Create to download a private key.
    • google drive add service image
    • If you are facing the below-mentioned error while creating the P12 File, then click here: https://www.shoviv.com/technical-guide/service-account-key-creation-is-disabled.html
    • google drive add service image