vaxas59775 Posted November 30, 2023 Posted November 30, 2023 Hello, I'm trying to refresh my expired token by following Renew an Access Token section in the https://developer.sage.com/accounting/guides/authenticating/authentication/ . But I'm getting DataParsingError error. My request response log is: ~~~ REQUEST ~~~ POST /token HTTP/1.1 HOST : oauth.accounting.sage.com HEADERS: Content-Type: application/json BODY : { "client_id": "****", "client_secret": "****", "grant_type": "refresh_token", "refresh_token": "****" } ------------------------------------------------------------------------------ ~~~ RESPONSE ~~~ STATUS : 400 Bad Request HEADERS : Connection: keep-alive Content-Length: 125 Content-Type: application/json;charset=UTF-8 ... (trimmed cloudfront headers) X-Cache: Error from cloudfront BODY : { "$severity": "error", "$dataCode": "DataParsingError", "$message": "The data you sent could not be processed.", "$source": "Proxy" } ============================================================================== Where do I'm wrong?
Steel, Mark Posted November 30, 2023 Posted November 30, 2023 Hi, thanks for your question. The attached image relates to the information provided in our oAuth guide found at https://developer.sage.com/accounting/guides/authenticating/authentication/ It appears you're missing Content-Type: application/x-www-form-urlencoded from the request header. Thanks Mark
vaxas59775 Posted November 30, 2023 Author Posted November 30, 2023 It fixed when send url_encoded refresh_token
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now