I'm experiencing the same issue as @iamaadim5.
https://community.clover.com/questions/47833/expiring-oauth-returning-unauthorized-status-with.html
I do not have the optional launch path configured.
const
tokens
=
await
$fetch
(
`
${
cloverEndpoint
}
/oauth/v2/token`
, {
body : {
client_id : process . env .CLOVER_APP_ID,
client_secret : process . env .CLOVER_APP_SECRET,
code : req . input . code ,
},
method : 'POST' ,
headers : {
Authorization : `Bearer ${ process . env .CLOVER_APP_SECRET } `
}
})
body : {
client_id : process . env .CLOVER_APP_ID,
client_secret : process . env .CLOVER_APP_SECRET,
code : req . input . code ,
},
method : 'POST' ,
headers : {
Authorization : `Bearer ${ process . env .CLOVER_APP_SECRET } `
}
})
Responds with
{ status: 'Unauthorized', message: 'Failed to validate authentication code.' }
Any clarification of what may be wrong with this request would be extremely helpful.
Best,
Alex