Get User Details

This API gives a merchant the PhonePe’s user details corresponding to an access token. This can be used to facilitate Single Sign-On in the merchant’s system as the user details have already been verified by PhonePe.

Request Headers

Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <merchant-auth-token>
X-CLIENT-IDUnique MID(shared by Phonepe) needs to be sent as a parameter unless a different value is shared by PhonePe team.
In case of aggregator, please send AppuniqueID in the header

Response Parameters

Parameter NameTypeDescription
successBOOLEANSuccess status of the request
codeENUMSee list of response codes below
dataObjectThe data object that has to be passed to the sdk.

Response Codes

CodeDescription
UNAUTHORIZEDThe grantToken provided is either invalid or not mapped to the merchant.
BAD_REQUESTInvalid request payload
AUTHORIZATION_FAILEDIncorrect Authorization header
INTERNAL_SERVER_ERRORSomething went wrong
API_RATE_LIMIT_REACHEDIf the API call limit is breached then HTTP status code 429 would be sent
Is this article helpful?