Paste your client ID into OAuth Client ID.Check the Use your own OAuth credentials box.Click the OAuth 2.0 Configuration icon (looks like a gear in upper right corner).Copy your client ID and client secret to use in steps 18, 19, and 24 and then click OK.Next, enter a name such as Scripts web app in the Name field. Select Web application Application type.On Dashboard, click Credentials in the left navigation pane, then click Create credentials and select Oauth client ID.Click ADD USERS, enter your Google email and click ADD.Enter the name of your application in the Application name field (for example, Scripts client) and enter your email in the fields that ask for it, then click SAVE AND CONTINUE.If asked to select a User Type, select External, then click Create On Dashboard, click Credentials in the left navigation pane and then click CONFIGURE CONSENT SCREEN.Go back to the dashboard (click APIs & Services) and repeat steps 3 and 4 for Gmail API.Go back to the dashboard (click APIs & Services) and repeat steps 3 and 4 for Google Drive API.In the search box, enter sheets and click Google Sheets API.On Dashboard, click ENABLE APIS AND SERVICES.If creating a new project, enter the name of your project in Project Name.Click Create a project to create a new project or select an existing project.Go to Google developer console API dashboard.Option 2 - Getting a refresh token from Google OAuth playground In solutions like Discovering disapproved ads, which access Google services, set the credentials object's accessToken field to the access token copied in step 5.īecause the access token expires in 1 hour, you'll need to repeat these steps every hour.Copy the access_token's value from the response.After the APIs are authorized, click Exchange authorization code for tokens.Option 1 - Getting an access token from Google OAuth playground
0 Comments
Leave a Reply. |