0

I'm trying to automate process via Jenkins, for creating and deleting users in G-Suite via API. I could generate API Key, OAuth 2.0 Cliend ID & Client Secret, but from this page: https://developers.google.com/admin-sdk/directory/v1/guides/authorizing.html?authuser=1 i understand, that i need to get access token. So i can't find any place where can i can access token or refresh token and how to request it, anyone who succeeded in this?

Leonid Kopylov
  • 41
  • 1
  • 1
  • 5

1 Answers1

0

You need to create a token using JWT and impersonate an admin (not sure if super admin) in order to be able to create Users in G Suite

Check the JWT documentation

Hope it helps!

  • i tried using JWT - it's says invalid credentials, so i tried from link above, to use "service_account", and get an error: **`AttributeError: module 'google.oauth2.service_account' has no attribute 'Credentials'`** any ideas? – Leonid Kopylov Oct 05 '19 at 19:26