Support > Forums > OpenBots Studio > Google OCR

Google OCR

Flexible Technology

  • Reporter
  • Calender Icon July 27,2023 at 8:05 AM

How to get credential.txt for google ocr command

This forum has 314 topics, 681 replies, and was last updated 20 days ago by Support Agent

Flexible Techno...

  • Participant
  • Calender Icon August 01,2023 at 2:51 AM

Do I need to enable which google api service?

Flexible Techno...

  • Participant
  • Calender Icon August 01,2023 at 2:44 AM

Type: 'InvalidOperationException', Message: 'Error reading credential file from location D:\Project\Openbot\OB Scripts\AttendedAutomationSample\AttendedAutomationSample\Input\Cred.json: Error creating credential from JSON or JSON parameters. Unrecognized credential type . Please check the value of the Environment Variable GOOGLE_APPLICATION_CREDENTIALS']

I got this error from running Google OCR command

Flexible Techno...

  • Participant
  • Calender Icon August 01,2023 at 2:44 AM

Type: 'InvalidOperationException', Message: 'Error reading credential file from location D:\Project\Openbot\OB Scripts\AttendedAutomationSample\AttendedAutomationSample\Input\Cred.json: Error creating credential from JSON or JSON parameters. Unrecognized credential type . Please check the value of the Environment Variable GOOGLE_APPLICATION_CREDENTIALS']

I got this error from running Google OCR command

Nataly Alvarado...

  • Participant
  • Calender Icon July 28,2023 at 3:28 PM

Hi Flexible Technology,

Once you follow the steps provided in the guide, you'll be able to generate the OAuth2 credential json file (see below image for reference). You can then reference this file when using the GoogleOCR commands.

Also attaching a sample file (with invalid values) for your reference.

Flexible Techno...

  • Participant
  • Calender Icon July 28,2023 at 4:01 AM

Give me example text file, thank.

Flexible Techno...

  • Participant
  • Calender Icon July 28,2023 at 4:01 AM

In Google OCR command required parameter credential.txt . So how the value in that text file look like ?

Nataly Alvarado...

  • Participant
  • Calender Icon July 27,2023 at 2:37 PM

Hi Flexible Technology,

Thanks for submitting your support query.

Note that you would need to create a Google Application to interact with the Google Workspace API and generate a set of OAuth2 credentials.

You can follow this link for reference: https://developers.google.com/workspace/guides/get-started ​ ​Also, this step-by-step guide: https://github.com/jstedfast/MailKit/blob/master/GMailOAuth2.md#register-your-application-with-google ​ Thanks!

You are not authorized to reply, please click here to login and add your reply to this topic.