• English
  • Exchange of authorized access tokens

    Request path

    /api/v2/open-auth/oauth/token

    Parameter list

    NameTypeLengthRequiredDescription
    authCodeString64yesauthorization code

    Return value

    NameTypeLengthRequiredDescription
    accessTokenString64yesAccess token
    accessTokenExpireTimeLong32yesAccess token expiration date,timestamp
    refreshTokenString64yesRefresh token
    refreshTokenExpireTimeLong32yesRefresh token expiration date,timestamp
    openIdString64yesUnique identification of PalmPay users
    userNickString64noUser nickname(can be obtained from palmpay and returned after passing)
    userIconUrlString128noUser profile picture(can be obtained from palmpay and returned after passing)
    userMobileNoString20noUser moblile phone number(can be obtained from palmpay and returned after passing)

    Error code

    Error Code

    Postman example

    request

    curl --location --request POST 'http://open-gw-daily.palmpay-inc.com/api/v2/open-auth/oauth/token' \
    --header 'Authorization: Bearer L79603172242' \
    --header 'Signature: Iadk/OkdWnRvofPwcCLA9WH7IQOhG/Ehr7kvKrRLI6jr3OXzwDfgKNkZkxcakEladdQwG1RZpuboaQaDcIknW8JamzURO60R57Y7D9QmBBW8qp7mIAl7u3mGXPrPT8ZE0n1EvUKmpuac8XsCLEV17IYIkPJkAo5y5MWKJUYQOks=' \
    --header 'CountryCode: NG' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "requestTime":1662171389940,
        "version":"V1.1",
        "nonceStr":"IBJGAeTa4ZJQv4Z2qufomVo9eI1YnJ9Y",
        "authCode":"45e0cff7ac954fa4b0e42f8132e68e05"
    }'

    response

    {
    	"data": {
    		"accessToken": "20231102b0a845f6fdd362f490722a5c5659e742",
    		"accessTokenExpireTime": 1698918425716,
    		"openId": "6591045aa15654b219d1a28c0f67da9c",
    		"refreshToken": "2023110277bacd982dea2cf4a53ff1801695016c",
    		"refreshTokenExpireTime": 1701503225716,
            "userNick": "nick",
            "userIconUrl":"https://transsnet-android-upload-image-prod.s3.amazonaws.com/activity/167168785883410-icon.png",
            "userMobileNo":"023401592561438"
    	},
    	"respCode": "00000000",
    	"respMsg": "success"
    }