How to get Organisation Name via Admin-SDK APIs for the admin user?

こ雲淡風輕ζ 提交于 2019-12-11 09:22:02

问题


We want to use one of the Google API's Admin-SDK via OAuth2 access_token to get the Organization Name of the client who registers with our App from the Marketplace. The documentation says, all I need to do is query the below URL to get Organization Name

http: // apps-apis.google.com/a/feeds/domain/2.0/{domainName}/general/organizationName

And as expected, we have set https: // apps-apis.google.com/a/feeds/domain/ as one of scope parameter

Can any one explain me how should I do this provided, I have access_token for the admin user who registered.

Should it be called as

https: // apps-apis.google.com/a/feeds/domain/2.0/{domainName}/general/organizationName?access_token=${ACCESS_TOKEN}

or

Should I pass some headers to it, to get the organisation name?

Is it possible to do this with Google APIs ? ( of the type www.googleapis.com/auth ... )


回答1:


I'd recommend using the newer, OAuth2-based APIs that is under https://www.googleapis.com/admin/directory/v1/users. You can either GET a user or LIST/search.



来源:https://stackoverflow.com/questions/22451827/how-to-get-organisation-name-via-admin-sdk-apis-for-the-admin-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!