search

getUserInfo API

Use Case

This API gives a merchant the Paytm's user details (Profile Name, Email and Phone Number) corresponding to an access token. This should be used to facilitate seamless Login in the merchant's system.

Request Attributes

API Content format: JSON

Head

ATTRIBUTEDESCRIPTIONMANDATORY
verification_typeThis is verification type like "oauth_token"Yes
dataAuth Token you received via S2S call in getAccessToken APIYes
AuthorizationThis will be a base64 encoded string of client_id:client_secretYes

Response Attributes

Head

ATTRIBUTEDESCRIPTIONEXAMPLE
statusstatus of response200

Success:

PARAMETERDESCRIPTIONEXAMPLE VALUE
emailEmail id of the userabc@xyz.com
profileInfo.displayNameDisplay name of the userShaurya
phoneInfo.countryCodeUsers country code91
phoneInfo.phoneNumberPhone number of the user9878654532

Error Codes

RESPONSE CODESTATUSMESSAGE
401FailureUnauthorized Request
434FailureBad Request
530FailureInsufficient parameters
827FailureThere was issue in processing request
514FailureUser Not Found
827FailureThere was issue in processing request
1301FailureClient does not have permission to fetch
3005FailureBlocked due to security reasons
UAT
Production
https://accounts-uat.paytm.com/v2/user?fetch_strategy=profile_info,phone_number,email
copy content icon
REQUEST CODE
RESPONSE CODE
CURL
JAVASCRIPT
copy content icon
curl -X GET 
'https://accounts.paytm.com/v2/user?
fetch_strategy=profile_info,phone_number,email'
 --header 'verification_type: oauth_token' --
header 'data: asdf-fdsf-werw-gdfg' --header
 'cache-control: no-cache' --header 
 'Authorization: Basic 
YWxhZGRpbjpvcGVuc2VzYW1l'