@@ -394,12 +394,13 @@ def get_access_token_by_uid(self, uid):
394394 resource_path = "identity/v2/manage/account/access_token"
395395 return self ._lr_object .execute ("GET" , resource_path , query_parameters , {})
396396
397- def reset_phone_id_verification_by_uid (self , uid , sms_template = '' ):
397+ def reset_phone_id_verification_by_uid (self , uid , sms_template = '' , is_voice_otp = False ):
398398 """This API Allows you to reset the phone no verification of an end user’s account.
399399
400400 Args:
401401 uid: UID, the unified identifier for each user account
402402 sms_template: SMS Template name
403+ is_voice_otp: Boolean, pass true if you wish to trigger voice OTP
403404
404405 Returns:
405406 Response containing Definition of Complete Validation data
@@ -414,6 +415,8 @@ def reset_phone_id_verification_by_uid(self, uid, sms_template=''):
414415 query_parameters ["apiSecret" ] = self ._lr_object .get_api_secret ()
415416 if (not self ._lr_object .is_null_or_whitespace (sms_template )):
416417 query_parameters ["smsTemplate" ] = sms_template
418+ if (is_voice_otp is not None ):
419+ query_parameters ["isVoiceOtp" ] = is_voice_otp
417420
418421 resource_path = "identity/v2/manage/account/" + uid + "/invalidatephone"
419422 return self ._lr_object .execute ("PUT" , resource_path , query_parameters , {})
@@ -520,6 +523,51 @@ def revoke_refresh_token(self, refresh__token):
520523 resource_path = "identity/v2/manage/account/access_token/refresh/revoke"
521524 return self ._lr_object .execute ("GET" , resource_path , query_parameters , {})
522525
526+ def revoke_all_refresh_token (self , uid ):
527+ """The Revoke All Refresh Access Token API is used to revoke all refresh tokens for a specific user.
528+
529+ Args:
530+ uid: UID, the unified identifier for each user account
531+
532+ Returns:
533+ Response containing Definition of Delete Request
534+ 18.33
535+ """
536+
537+ if (self ._lr_object .is_null_or_whitespace (uid )):
538+ raise Exception (self ._lr_object .get_validation_message ("uid" ))
539+
540+ query_parameters = {}
541+ query_parameters ["apiKey" ] = self ._lr_object .get_api_key ()
542+ query_parameters ["apiSecret" ] = self ._lr_object .get_api_secret ()
543+
544+ resource_path = "identity/v2/manage/account/" + uid + "/access_token/refresh/revoke"
545+ return self ._lr_object .execute ("DELETE" , resource_path , query_parameters , {})
546+
547+ def multipurpose_email_token_generation (self , multi_email_token , tokentype ):
548+ """This API generate Email tokens and Email OTPs for Email verification, Add email, Forgot password, Delete user, Passwordless login, Forgot pin, One-touch login and Auto login.
549+
550+ Args:
551+ multi_email_token: Model Class containing Definition of payload for Multipurpose Email Token Generation API
552+ tokentype: The identifier type for the token that we need to generate
553+
554+ Returns:
555+ Response containing Definition for Complete MultiToken
556+ 18.34
557+ """
558+ if (multi_email_token is None ):
559+ raise Exception (self ._lr_object .get_validation_message ("multi_email_token" ))
560+
561+ if (self ._lr_object .is_null_or_whitespace (tokentype )):
562+ raise Exception (self ._lr_object .get_validation_message ("tokentype" ))
563+
564+ query_parameters = {}
565+ query_parameters ["apiKey" ] = self ._lr_object .get_api_key ()
566+ query_parameters ["apiSecret" ] = self ._lr_object .get_api_secret ()
567+
568+ resource_path = "identity/v2/manage/account/emailtoken/" + tokentype
569+ return self ._lr_object .execute ("POST" , resource_path , query_parameters , multi_email_token )
570+
523571 def get_account_identities_by_email (self , email , fields = '' ):
524572 """Note: This is intended for specific workflows where an email may be associated to multiple UIDs. This API is used to retrieve all of the identities (UID and Profiles), associated with a specified email in Cloud Storage.
525573
@@ -567,6 +615,30 @@ def account_delete_by_email(self, email):
567615 resource_path = "identity/v2/manage/account"
568616 return self ._lr_object .execute ("DELETE" , resource_path , query_parameters , {})
569617
618+ def multipurpose_sms_otp_generation (self , multi_sms_otp , smsotptype ):
619+ """This API generates SMS OTP for Add phone, Phone Id verification, Forgot password, Forgot pin, One-touch login, smart login and Passwordless login.
620+
621+ Args:
622+ multi_sms_otp:
623+ smsotptype: The identifier type for the OTP that we need to generate
624+
625+ Returns:
626+ Response containing Definition for Complete MultiToken
627+ 18.44
628+ """
629+ if (multi_sms_otp is None ):
630+ raise Exception (self ._lr_object .get_validation_message ("multi_sms_otp" ))
631+
632+ if (self ._lr_object .is_null_or_whitespace (smsotptype )):
633+ raise Exception (self ._lr_object .get_validation_message ("smsotptype" ))
634+
635+ query_parameters = {}
636+ query_parameters ["apiKey" ] = self ._lr_object .get_api_key ()
637+ query_parameters ["apiSecret" ] = self ._lr_object .get_api_secret ()
638+
639+ resource_path = "identity/v2/manage/account/smsotp/" + smsotptype
640+ return self ._lr_object .execute ("POST" , resource_path , query_parameters , multi_sms_otp )
641+
570642 def account_update_uid (self , update_uid_model , uid ):
571643 """This API is used to update a user's Uid. It will update all profiles, custom objects and consent management logs associated with the Uid.
572644
0 commit comments