I am trying to find an example in .NET to gerneate the following call to the Google Admin API:
PUT https://www.googleapis.com/admin/directory/v1/users/user%40domain.com?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.1.AADtN_U3
X-JavaScript-User-Agent: Google APIs Explorer
{
"password": "7c4a8d09ca3762af61e59520943dc26494f8941b",
"hashFunction": "SHA-1"
}
I cannot seem to find any code examples for .net as to how to duplicate this. The page https://developers.google.com/admin-sdk/directory/v1/reference/users/update demonstrates the functionality I am trying to localize and use from a .NET application. Any help would be appreciated. We need to leverage this API for an initial password update. We do not allow our students to change passwords so this JSon update is required for us to be able to use Google Apps for Education.
I fought this for a week or so and finally got it to work.
Blogged about it here - how to setup your project, developer console, admin console and .net
http://blog.mwpreston.net/2014/10/17/google-admin-sdk-apis-and-net-integration-changing-a-users-password/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With