-2

I want to integrate google classroom with our web-based SIS application. The objective is to create courses, invite students & teachers for courses, and fetch grades from google classroom to my application and I don't want my application to prompt consent screen and use API key instead for the above actions.

Second, can we create multiple classrooms for multiple institutes which are signed up on our application using one API key?

Please guide me on how can I achieve both the above scenarios.

Note: I am using personal Google accounts to create and send invitations to personal accounts for joining classes as teachers and students from my application. No Google Workspace for Education accounts.

  • Just like using API key. I have an account I don't want my application to prompt me every time. I need an API key that can be generated and placed inside the project and authentication can be done. I am not saying I don't want to perform actions on behalf of other users without their consent. Actually, I want to perform actions within my own classrooms without prompting the consent screen. – Hassaan Rana Nov 22 '21 at 14:03

1 Answers1

1

APi keys only allow you access to public data.

For example:

  • Public holiday calendars on Google calendar.
  • Public videos on YouTube.

If you want to create something like for example a courses via google class rooms then that classroom would be created on someone's account. The owner of that account would need to give you permission to do that. As its private user data.

You can not use an api key to access Google classrooms api.

If you check the courses.create method in the documentation you can see that it states that you need permission in order to use this method.

enter image description here

You can read more about authorization in the documentation.

As this is your own account you are trying to connect to. You should look into offline access. You could authorize your application once get a refresh token and then your application will be able to use the refresh token to request a new access token when it needs to.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449