Skip to main content

Getting user information

Getting basic information of logged-in users#

With just the access_token, you can obtain some basic information about the logged-in customer, authorized at the moment they completed the consent. Below is an example:

curl --location --request GET 'https://api.picpay.com/oauth2/userinfo' \
--header 'Authorization: Bearer {access_token}'

Below is an example of a successful response:

{
"seller": "polenta.store@pm.me",
"sub": "f:Xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx:xxxxx",
"email_verified": true,
"birthdate": "2020-03-05",
"preferred_username": "polento",
"email": "polenta.the.dog@gmail.com"
}

Error messages#

If any error occurs, we will inform the reason in the request response as shown below:

{
"error": "invalid_token",
"error_description": "Token verification failed"
}