This service gives a merchant the access token corresponding to a grant token. This token can be used to fetch the User details in the getUserDetails API
<html-block html=”
Request Headers
“>
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(only base64 encoded str+ “/v3/service/auth/access” + salt key) + ### + salt index |
X-CLIENT-ID | Unique MID(shared by Phonepe) needs to be sent as a parameter unless a different value is shared by PhonePe team.
In case of aggregator, please send AppuniqueID in the header |
{
"grantToken":"GRTe098bd540176757ybbnhu879125ebec723741c5189f6a4e303f2b9d28d3e4d1289bd61dd"
}
{
"request": "ewoJImdyYW50VG9rZW4iOiJHUlRlMDk4YmQ1NDAxNzY3NTd5YmJuaHU4NzkxMjVlYmVjNzIzNzQxYzUxODlmNmE0ZTMwM2YyYjlkMjhkM2U0ZDEyODliZDYxZGQiCn0="
}
<html-block html=”
Request Parameters
“>
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
grantToken | STRING | Unique grantToken generated by the call to fetchAuthToken as mentioned in the last section fetchAuthToken ] | Yes |
<html-block html=”
Response Parameters
“>
Parameter Name | Type | Description |
---|---|---|
success | BOOLEAN | Success status of the request |
code | ENUM | See list of response codes below |
data | Object | The data object that has to be passed to the sdk. |
<html-block html=”
Response Codes
“>
Code | Description |
---|---|
UNAUTHORIZED | The grantToken provided is either invalid or not mapped to the merchant. |
BAD_REQUEST | Invalid request payload |
AUTHORIZATION_FAILED | Incorrect X-VERIFY header |
INTERNAL_SERVER_ERROR | Something went wrong |
API_RATE_LIMIT_REACHED | If the API call limit is breached then HTTP status code 429 would be sent |
{“method”:”post”,”url”:”/v3/service/auth/access”,”auth”:”required”,”results”:{“codes”:[{“name”:””,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”data\”: {\n \”accessToken\”: \”AUTHca12ab41b97bea5268e65593ab2a1cc697338a656e8\”,\n \”expiresInSeconds\”: 1800\n }\n}”,”language”:”json”,”status”:200},{“name”:””,”code”:”{}”,”language”:”json”,”status”:400}]},”params”:[{“name”:”request”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”base64 encoded payload”,”required”:false,”in”:”body”,”ref”:””,”_id”:”5da61918b71eb80203e6067b”},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(only base64 encoded str+ \”/v3/service/auth/access\” + salt key) + ### + salt index”,”required”:false,”in”:”header”,”ref”:””,”_id”:”5da61918b71eb80203e6067a”},{“name”:”X-CLIENT-ID”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique MID(shared by Phonepe) needs to be send as a parameter”,”required”:false,”in”:”header”,”ref”:””,”_id”:”5da6199c9fb5ca00115ad983″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:false,”in”:”header”,”ref”:””,”_id”:”5da619ee9fb5ca00115ad9a1″}],”apiSetting”:”5da600be463ecf036287d7f3″,”examples”:{“codes”:[]}}
https://apps-uat.phonepe.com