Get Profile

This method retrieves the phone number of the user. It returns a promise that resolves with the phone number or rejects it if there is an error.

Path/v1/mini-apps/users/profile
Hosthttps://public-mini-app-merchants.gopayapi.com
Http MethodGET

Request Headers:

PropertyData typeRequiredDescription
Debug-IdstringNoThis is an identifier that is used for debugging purposes
Request-IdstringYesThis is an identifier that is used for maintaining idempotency
AuthorizationstringYesBearer Authorization header
This is the token you would receive in the apply token API

Response:

PropertyData typeDescription
successbooleanIt will be true if API call is successful and false in case of failure
errorobjectThis object will be non-null only in case of failures
error.codestringThe error code
error.descriptionstringThe description of the error

Sample Response:

Success Response:

{
  "success": true,
  "error": {},
  "data": {
    "phone_number": "+628210072773",
    "email": "[email protected]",
    "username": "example",
  }
}

Error Response: With appropriate HTTP status codes. Only 5xx would be retriable

{
  "success": false,
  "error": {
    "code": "105",
    "description": "User not found"
  }
}

Error codes:

Error codeDescription
105User not found
303Malformed Authorization
900Unable to process