2017-03-03 21 views
0

我正在嘗試用service.users().update更新用戶。它返回一個200響應,但不改變任何東西。使用python更新google應用用戶

results2 = service.users().update(
    userKey='116908937914240107065', 
    fields='id,name/fullName,primaryEmail', 
    body='{"primaryEmail":"[email protected]"}' 
    ).execute() 

print('id: {0} | Email: {1} | Nome: {2}'.format(results2['id'],results2['primaryEmail'], results2['name']['fullName'])) 
+0

也許谷歌中的錯誤? –

回答

0

幹了! 只是想知道爲什麼響應= 200時,有代碼之間的誤差......

沒有'{ 「primaryEmail」: 「[email protected]」}解決了這個...

body={"primaryEmail":"[email protected]"} 
相關問題