#Exchange of authorized access tokens
#Request path
/api/v2/open-auth/oauth/token#Parameter list
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| authCode | String | 64 | yes | authorization code |
#Return value
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| accessToken | String | 64 | yes | Access token |
| accessTokenExpireTime | Long | 32 | yes | Access token expiration date,timestamp |
| refreshToken | String | 64 | yes | Refresh token |
| refreshTokenExpireTime | Long | 32 | yes | Refresh token expiration date,timestamp |
| openId | String | 64 | yes | Unique identification of PalmPay users |
| userNick | String | 64 | no | User nickname(can be obtained from palmpay and returned after passing) |
| userIconUrl | String | 128 | no | User profile picture(can be obtained from palmpay and returned after passing) |
| userMobileNo | String | 20 | no | User moblile phone number(can be obtained from palmpay and returned after passing) |
#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"
}