简体   繁体   中英

How to migrate from the Provisioning API to the Admin SDK API?

The current application is written in JAVA. I plan to follow the steps here https://developers.google.com/admin-sdk/directory/v1/quickstart/quickstart-java but I have little experience with JAVA and would like to make the migration as simple as possible. The API is being used to create a new email account.

This is what I have now:

  • The logic to create a google account and save data to our database is in GDataServlet.java
  • ClientWrapper.java is calling the function that creates the account
  • AppsForYourDomainClient.java is where the API call is being made with " https://www.google.com/a/feeds/ ";

How to move forward?

  • Update ClientWrapper.java to call the new API?
  • Or create a new table in our database that will store the data we need and create a new service that will call the new API?
  • I do not believe that GDataServlet.java needs to be modified.

Also if I am using the Service account Client ID type which I believe is what I need, where do I find the Client secret? I seem to have a Client Secret only when I select the Web Application Client ID type.

The Provisioning API and the Admin SDK/Directory API work differently, the Directory API is based on REST. So you will need to update your code where you call the API.(I didn't understand what class you use for that and also the purpose of your classes)

As for how to move forward, it would be up to you. But if the "AppsForYourDomainClient" is the class you use to call the api I think you should update that one to call the new API. If you don't have to modify "GDataServlet" then don't do it.

Here you can find the documentation on service account and the information you would need to authenticate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM