Ask permission

The capability will allow a merchant to ask permission from the user to share his details on the Switch platform.

(listOfPermissions: string[])

Description: This method is used to ask for permissions for

  • Accessing User Location
  • Reading SMS (Android only)

<html-block html=”

Request Parameter


Parameter NameTypeDescription
listOfPermissionsArray<string>List of the permissions that you would like to ask for. The permissions you can ask for are described in the table below.
Promise resolve:
      "willShowPermissionAlertAgain": false
      "permissionGranted": true,
      "willShowPermissionAlertAgain": false

<html-block html=”

Response Parameters



Permission NameDescription
READ_SMS (accessed as
PhonePe.Constants.Permission. READ_SMS)
Read the user SMS​ for functionalities like OTP detection. Only available for Android.
LOCATION (accessed as
Retrieve the user’s location.
CAMERA (accessed as
Asks for camera permission


let result = await sdk.seekPermission([PhonePe.Constants.Permission.READ_SMS, PhonePe.Constants.Permission.LOCATION,PhonePe.Constants.Permission.CAMERA])