Integrations

OAuth2 - Google Sheets

11min
the google sheets credential relies on the oauth2 protocol oauth2 is an industry standard protocol for authorization it allows a client to easily authenticate and authorize access to resources this documentation is deprecated, follow the new guide for a how to get google oauth2 credentials you will first need to go to the google cloud console from there, you will need to go through the following steps select or create a project in google cloud console if you don’t have a google project yet, or if you need to create a new project dedicated to your procesio usage, you will need to create such a project and fill in the required information enable the google sheets api in your project note that if the google sheets api is already enabled in your project, it will appear listed in your dashboard 2\ if you have not enabled the google sheets api in your project yet, click on the button β€œenable apis and services” > search for the google sheets api and select it 3\ click enable create credentials 4\ click β€œ create credentials ” to create a new credential for your google sheets api 5\ select β€œ user data ” and click next 6\ add a name , an email for support and developer contact information then save and continue 7\ in the scopes section click add or remove scopes and select the google sheets api scopes you need, then click update 8\ after you added the scopes click save and continue 9\ in the oauth client id select web application and add a name for the application after selecting web application as application type, the section will expand displaying authorized redirect uris 10\ go in procesio and create an oauth 2 credential 11\ copy the oauth redirect url (automatically generated by procesio when creating the credential) 11\ return to google cloud console in the oauth client id section, and under authorized redirect uris click +add uri and paste the link copied from procesio 12\ click create and then done 13\ click on the oauth consent screen in the right side panel, and under test users , click +add users and enter your email address if the application is created using an enterprise email within a specific organization if the application user type is set to internal , all users from that organization will have access to the app, and the test users section will not be displayed if the application user type is set to external , you should add the emails that need access to the app under test users 13\ click on the credentials section in the right side panel, in the oauth 2 0 client ids section, click on the newly created application 14\ copy the client id and client secret 15\ return to the create credential section in procesio and finish creating the credential all the urls needed can be found in the api documentation of the app (google sheets in this case) in the url field you need to input the endpoint where the requests will be made https //sheets googleapis com/v4 in the scopes field input the scopes you need to use https //www googleapis com/auth/spreadsheets readonly https //www googleapis com/auth/spreadsheets in the client id and client secret fields insert the values from the credential created in google cloud (copied at step 14) in the auth url field you need to input the authorization url https //accounts google com/o/oauth2/v2/auth in the token url field you need to input the token url https //oauth2 googleapis com/token 16\ click " save and authorize " to generate your token 17\ if the google app created in the google cloud console is in testing (no need to publish the app), you will receive the following prompt if the application is created using an enterprise email within a specific organization and with the user type set as internal , this prompt will not be displayed click continue 18\ in the following prompt check select all and click continue 19\ in the test connection section add any get request in order to confirm that everything was configured properly endpoint /spreadsheets/{sheetid}/values/a1\ b9 replace {sheetid} with your sheet id 20\ click save to save the credential