blob: 339a9a5537c0c7f4d2cbe34f9dcb97d5b43777c4 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="identitytoolkit_v3.html">Google Identity Toolkit API</a> . <a href="identitytoolkit_v3.relyingparty.html">relyingparty</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#createAuthUri">createAuthUri(body)</a></code></p>
79<p class="firstline">Creates the URI used by the IdP to authenticate the user.</p>
80<p class="toc_element">
81 <code><a href="#deleteAccount">deleteAccount(body)</a></code></p>
82<p class="firstline">Delete user account.</p>
83<p class="toc_element">
84 <code><a href="#downloadAccount">downloadAccount(body)</a></code></p>
85<p class="firstline">Batch download user accounts.</p>
86<p class="toc_element">
87 <code><a href="#getAccountInfo">getAccountInfo(body)</a></code></p>
88<p class="firstline">Returns the account info.</p>
89<p class="toc_element">
90 <code><a href="#getOobConfirmationCode">getOobConfirmationCode(body)</a></code></p>
91<p class="firstline">Get a code for user action confirmation.</p>
92<p class="toc_element">
93 <code><a href="#getPublicKeys">getPublicKeys()</a></code></p>
94<p class="firstline">Get token signing public key.</p>
95<p class="toc_element">
96 <code><a href="#resetPassword">resetPassword(body)</a></code></p>
97<p class="firstline">Set account info for a user.</p>
98<p class="toc_element">
99 <code><a href="#setAccountInfo">setAccountInfo(body)</a></code></p>
100<p class="firstline">Set account info for a user.</p>
101<p class="toc_element">
102 <code><a href="#uploadAccount">uploadAccount(body)</a></code></p>
103<p class="firstline">Batch upload existing user accounts.</p>
104<p class="toc_element">
105 <code><a href="#verifyAssertion">verifyAssertion(body)</a></code></p>
106<p class="firstline">Verifies the assertion returned by the IdP.</p>
107<p class="toc_element">
108 <code><a href="#verifyPassword">verifyPassword(body)</a></code></p>
109<p class="firstline">Verifies the user entered password.</p>
110<h3>Method Details</h3>
111<div class="method">
112 <code class="details" id="createAuthUri">createAuthUri(body)</code>
113 <pre>Creates the URI used by the IdP to authenticate the user.
114
115Args:
116 body: object, The request body. (required)
117 The object takes the form of:
118
119{ # Request to get the IDP authentication URL.
120 "identifier": "A String", # The email or federated ID of the user.
121 "clientId": "A String", # The relying party OAuth client ID.
122 "otaApp": "A String", # The native app package for OTA installation.
123 "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
124 "context": "A String", # The opaque value used by the client to maintain context info between the authentication request and the IDP callback.
125 "appId": "A String", # The app ID of the mobile app, base64(CERT_SHA1):PACKAGE_NAME for Android, BUNDLE_ID for iOS.
126 "continueUri": "A String", # The URI to which the IDP redirects the user after the federated login flow.
127 "openidRealm": "A String", # Optional realm for OpenID protocol. The sub string "scheme://domain:port" of the param "continueUri" is used if this is not set.
128 }
129
130
131Returns:
132 An object of the form:
133
134 { # Response of creating the IDP authentication URL.
135 "kind": "identitytoolkit#CreateAuthUriResponse", # The fixed string identitytoolkit#CreateAuthUriResponse".
John Asmuth614db982014-04-24 15:46:26 -0400136 "registered": True or False, # Whether the user is registered if the identifier is an email.
137 "providerId": "A String", # The provider ID of the auth URI.
Craig Citro065b5302014-08-14 00:47:23 -0700138 "forExistingProvider": True or False, # True if the authUri is for user's existing provider.
John Asmuth614db982014-04-24 15:46:26 -0400139 "authUri": "A String", # The URI used by the IDP to authenticate the user.
140 }</pre>
141</div>
142
143<div class="method">
144 <code class="details" id="deleteAccount">deleteAccount(body)</code>
145 <pre>Delete user account.
146
147Args:
148 body: object, The request body. (required)
149 The object takes the form of:
150
151{ # Request to delete account.
152 "localId": "A String", # The local ID of the user.
153 }
154
155
156Returns:
157 An object of the form:
158
159 { # Respone of deleting account.
160 "kind": "identitytoolkit#DeleteAccountResponse", # The fixed string "identitytoolkit#DeleteAccountResponse".
161 }</pre>
162</div>
163
164<div class="method">
165 <code class="details" id="downloadAccount">downloadAccount(body)</code>
166 <pre>Batch download user accounts.
167
168Args:
169 body: object, The request body. (required)
170 The object takes the form of:
171
172{ # Request to download user account in batch.
173 "nextPageToken": "A String", # The token for the next page. This should be taken from the previous response.
174 "maxResults": 42, # The max number of results to return in the response.
175 }
176
177
178Returns:
179 An object of the form:
180
181 { # Respone of downloading accounts in batch.
182 "nextPageToken": "A String", # The next page token. To be used in a subsequent request to return the next page of results.
183 "kind": "identitytoolkit#DownloadAccountResponse", # The fixed string "identitytoolkit#DownloadAccountResponse".
184 "users": [ # The user accounts data.
185 { # Template for an individual account info.
186 "displayName": "A String", # The name of the user.
187 "localId": "A String", # The local ID of the user.
188 "photoUrl": "A String", # The URL of the user profile photo.
189 "emailVerified": True or False, # Whether the email has been verified.
190 "passwordHash": "A String", # The user's hashed password.
191 "version": 42, # Version of the user's password.
192 "providerUserInfo": [ # The IDP of the user.
193 {
194 "federatedId": "A String", # User's identifier at IDP.
195 "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
196 "displayName": "A String", # The user's display name at the IDP.
197 "photoUrl": "A String", # The user's photo url at the IDP.
198 },
199 ],
200 "passwordUpdatedAt": 3.14, # The timestamp when the password was last updated.
201 "salt": "A String", # The user's password salt.
202 "email": "A String", # The email of the user.
203 },
204 ],
205 }</pre>
206</div>
207
208<div class="method">
209 <code class="details" id="getAccountInfo">getAccountInfo(body)</code>
210 <pre>Returns the account info.
211
212Args:
213 body: object, The request body. (required)
214 The object takes the form of:
215
216{ # Request to get the account information.
217 "idToken": "A String", # The GITKit token of the authenticated user.
218 "email": [ # The list of emails of the users to inquiry.
219 "A String",
220 ],
221 "localId": [ # The list of local ID's of the users to inquiry.
222 "A String",
223 ],
224 }
225
226
227Returns:
228 An object of the form:
229
230 { # Response of getting account information.
231 "kind": "identitytoolkit#GetAccountInfoResponse", # The fixed string "identitytoolkit#GetAccountInfoResponse".
232 "users": [ # The info of the users.
233 { # Template for an individual account info.
234 "displayName": "A String", # The name of the user.
235 "localId": "A String", # The local ID of the user.
236 "photoUrl": "A String", # The URL of the user profile photo.
237 "emailVerified": True or False, # Whether the email has been verified.
238 "passwordHash": "A String", # The user's hashed password.
239 "version": 42, # Version of the user's password.
240 "providerUserInfo": [ # The IDP of the user.
241 {
242 "federatedId": "A String", # User's identifier at IDP.
243 "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
244 "displayName": "A String", # The user's display name at the IDP.
245 "photoUrl": "A String", # The user's photo url at the IDP.
246 },
247 ],
248 "passwordUpdatedAt": 3.14, # The timestamp when the password was last updated.
249 "salt": "A String", # The user's password salt.
250 "email": "A String", # The email of the user.
251 },
252 ],
253 }</pre>
254</div>
255
256<div class="method">
257 <code class="details" id="getOobConfirmationCode">getOobConfirmationCode(body)</code>
258 <pre>Get a code for user action confirmation.
259
260Args:
261 body: object, The request body. (required)
262 The object takes the form of:
263
264{ # Request of getting a code for user confirmation (reset password, change email etc.)
265 "kind": "identitytoolkit#relyingparty", # The fixed string "identitytoolkit#relyingparty".
266 "requestType": "A String", # The request type.
267 "idToken": "A String", # The user's Gitkit login token for email change.
268 "challenge": "A String", # The recaptcha challenge presented to the user.
269 "newEmail": "A String", # The new email if the code is for email change.
270 "userIp": "A String", # The IP address of the user.
271 "email": "A String", # The email of the user.
272 "captchaResp": "A String", # The recaptcha response from the user.
273 }
274
275
276Returns:
277 An object of the form:
278
279 { # Response of getting a code for user confirmation (reset password, change email etc.).
280 "kind": "identitytoolkit#GetOobConfirmationCodeResponse", # The fixed string "identitytoolkit#GetOobConfirmationCodeResponse".
281 "oobCode": "A String", # The code to be send to the user.
282 }</pre>
283</div>
284
285<div class="method">
286 <code class="details" id="getPublicKeys">getPublicKeys()</code>
287 <pre>Get token signing public key.
288
289Args:
290
291Returns:
292 An object of the form:
293
294 { # Respone of getting public keys.
295 "a_key": "A String",
296 }</pre>
297</div>
298
299<div class="method">
300 <code class="details" id="resetPassword">resetPassword(body)</code>
301 <pre>Set account info for a user.
302
303Args:
304 body: object, The request body. (required)
305 The object takes the form of:
306
307{ # Request to reset the password.
308 "newPassword": "A String", # The new password inputted by the user.
309 "oldPassword": "A String", # The old password inputted by the user.
310 "oobCode": "A String", # The confirmation code.
311 "email": "A String", # The email address of the user.
312 }
313
314
315Returns:
316 An object of the form:
317
318 { # Response of resetting the password.
319 "kind": "identitytoolkit#ResetPasswordResponse", # The fixed string "identitytoolkit#ResetPasswordResponse".
320 "email": "A String", # The user's email.
321 }</pre>
322</div>
323
324<div class="method">
325 <code class="details" id="setAccountInfo">setAccountInfo(body)</code>
326 <pre>Set account info for a user.
327
328Args:
329 body: object, The request body. (required)
330 The object takes the form of:
331
332{ # Request to set the account information.
333 "displayName": "A String", # The name of the user.
334 "localId": "A String", # The local ID of the user.
335 "upgradeToFederatedLogin": True or False, # Mark the user to upgrade to federated login.
336 "captchaResponse": "A String", # Response to the captcha.
337 "idToken": "A String", # The GITKit token of the authenticated user.
338 "provider": [ # The associated IDPs of the user.
339 "A String",
340 ],
341 "captchaChallenge": "A String", # The captcha challenge.
342 "emailVerified": True or False, # Mark the email as verified or not.
343 "oobCode": "A String", # The out-of-band code of the change email request.
344 "password": "A String", # The new password of the user.
345 "email": "A String", # The email of the user.
346 }
347
348
349Returns:
350 An object of the form:
351
352 { # Respone of setting the account information.
353 "idToken": "A String", # The Gitkit id token to login the newly sign up user.
354 "kind": "identitytoolkit#SetAccountInfoResponse", # The fixed string "identitytoolkit#SetAccountInfoResponse".
355 "displayName": "A String", # The name of the user.
356 "email": "A String", # The email of the user.
357 "providerUserInfo": [ # The user's profiles at the associated IdPs.
358 {
359 "providerId": "A String", # The IdP ID. For whitelisted IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
360 "displayName": "A String", # The user's display name at the IDP.
361 "photoUrl": "A String", # The user's photo url at the IDP.
362 },
363 ],
364 }</pre>
365</div>
366
367<div class="method">
368 <code class="details" id="uploadAccount">uploadAccount(body)</code>
369 <pre>Batch upload existing user accounts.
370
371Args:
372 body: object, The request body. (required)
373 The object takes the form of:
374
375{ # Request to upload user account in batch.
Craig Citro065b5302014-08-14 00:47:23 -0700376 "hashAlgorithm": "A String", # The password hash algorithm.
John Asmuth614db982014-04-24 15:46:26 -0400377 "users": [ # The account info to be stored.
378 { # Template for an individual account info.
379 "displayName": "A String", # The name of the user.
380 "localId": "A String", # The local ID of the user.
381 "photoUrl": "A String", # The URL of the user profile photo.
382 "emailVerified": True or False, # Whether the email has been verified.
383 "passwordHash": "A String", # The user's hashed password.
384 "version": 42, # Version of the user's password.
385 "providerUserInfo": [ # The IDP of the user.
386 {
387 "federatedId": "A String", # User's identifier at IDP.
388 "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
389 "displayName": "A String", # The user's display name at the IDP.
390 "photoUrl": "A String", # The user's photo url at the IDP.
391 },
392 ],
393 "passwordUpdatedAt": 3.14, # The timestamp when the password was last updated.
394 "salt": "A String", # The user's password salt.
395 "email": "A String", # The email of the user.
396 },
397 ],
Craig Citro065b5302014-08-14 00:47:23 -0700398 "signerKey": "A String", # The key for to hash the password.
399 "memoryCost": 42, # Memory cost for hash calculation. Used by scrypt similar algorithms.
400 "saltSeparator": "A String", # The salt separator.
401 "rounds": 42, # Rounds for hash calculation. Used by scrypt and similar algorithms.
John Asmuth614db982014-04-24 15:46:26 -0400402 }
403
404
405Returns:
406 An object of the form:
407
408 { # Respone of uploading accounts in batch.
409 "kind": "identitytoolkit#UploadAccountResponse", # The fixed string "identitytoolkit#UploadAccountResponse".
410 "error": [ # The error encountered while processing the account info.
411 {
412 "index": 42, # The index of the malformed account, starting from 0.
413 "message": "A String", # Detailed error message for the account info.
414 },
415 ],
416 }</pre>
417</div>
418
419<div class="method">
420 <code class="details" id="verifyAssertion">verifyAssertion(body)</code>
421 <pre>Verifies the assertion returned by the IdP.
422
423Args:
424 body: object, The request body. (required)
425 The object takes the form of:
426
427{ # Request to verify the IDP assertion.
428 "requestUri": "A String", # The URI to which the IDP redirects the user back. It may contain federated login result params added by the IDP.
429 "postBody": "A String", # The post body if the request is a HTTP POST.
430 "pendingIdToken": "A String", # The GITKit token for the non-trusted IDP pending to be confirmed by the user.
431 }
432
433
434Returns:
435 An object of the form:
436
437 { # Response of verifying the IDP assertion.
438 "federatedId": "A String", # The unique ID identifies the IdP account.
439 "localId": "A String", # The RP local ID if it's already been mapped to the IdP account identified by the federated ID.
440 "photoUrl": "A String", # The URI of the public accessible profiel picture.
441 "inputEmail": "A String", # It's the identifier param in the createAuthUri request if the identifier is an email. It can be used to check whether the user input email is different from the asserted email.
442 "appScheme": "A String", # The custom scheme used by mobile app.
443 "verifiedProvider": [ # When action is 'map', contains the idps which can be used for confirmation.
444 "A String",
445 ],
446 "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com, live.net and yahoo.com. If the "providerId" param is set to OpenID OP identifer other than the whilte listed IdPs the OP identifier is returned. If the "identifier" param is federated ID in the createAuthUri request. The domain part of the federated ID is returned.
447 "dateOfBirth": "A String", # The birth date of the IdP account.
448 "nickName": "A String", # The nick name of the user.
449 "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
450 "language": "A String", # The language preference of the user.
451 "needConfirmation": True or False, # Whether the assertion is from a non-trusted IDP and need account linking confirmation.
452 "fullName": "A String", # The full name of the user.
453 "kind": "identitytoolkit#VerifyAssertionResponse", # The fixed string "identitytoolkit#VerifyAssertionResponse".
454 "idToken": "A String", # The ID token.
455 "displayName": "A String", # The display name of the user.
456 "appInstallationUrl": "A String", # URL for OTA app installation.
457 "firstName": "A String", # The first name of the user.
458 "emailVerified": True or False, # The value is true if the IDP is also the email provider. It means the user owns the email.
459 "oauthScope": "A String", # The scope for the OpenID OAuth extension.
460 "oauthRequestToken": "A String", # The user approved request token for the OpenID OAuth extension.
461 "originalEmail": "A String", # The original email stored in the mapping storage. It's returned when the federated ID is associated to a different email.
462 "context": "A String", # The opaque value used by the client to maintain context info between the authentication request and the IDP callback.
463 "lastName": "A String", # The last name of the user.
464 "action": "A String", # The action code.
465 "timeZone": "A String", # The timezone of the user.
466 "emailRecycled": True or False, # It's true if the email is recycled.
467 }</pre>
468</div>
469
470<div class="method">
471 <code class="details" id="verifyPassword">verifyPassword(body)</code>
472 <pre>Verifies the user entered password.
473
474Args:
475 body: object, The request body. (required)
476 The object takes the form of:
477
478{ # Request to verify the password.
479 "captchaResponse": "A String", # Response to the captcha.
480 "captchaChallenge": "A String", # The captcha challenge.
481 "password": "A String", # The password inputed by the user.
482 "email": "A String", # The email of the user.
483 "pendingIdToken": "A String", # The GITKit token for the non-trusted IDP, which is to be confirmed by the user.
484 }
485
486
487Returns:
488 An object of the form:
489
490 { # Request of verifying the password.
491 "kind": "identitytoolkit#VerifyPasswordResponse", # The fixed string "identitytoolkit#VerifyPasswordResponse".
492 "displayName": "A String", # The name of the user.
493 "localId": "A String", # The RP local ID if it's already been mapped to the IdP account identified by the federated ID.
494 "photoUrl": "A String", # The URI of the user's photo at IdP
495 "idToken": "A String", # The GITKit token for authenticated user.
496 "registered": True or False, # Whether the email is registered.
497 "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
498 }</pre>
499</div>
500
501</body></html>