Scenario

Paypal Authentication returns this error, although Content-Type: application/x-www-form-urlencoded set to Headers.

{
   "name":"MEDIA_TYPE_NOT_ACCEPTABLE",
   "message":"The server does not implement the media type that would be acceptable to the client.",
   "debug_id":"",//removed for security concern
   "details":[
      
   ],
   "links":[
      
   ]
}

Solutions

Paypal didn’t say so, but they like Accept:application/json in Headers. So the header should be something like:

'Authorization': 'Basic ' + base64EncodedClientIdClientSecret,
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
'Accept': 'application/json'
Last modified: 05/12/2023

Author

Comments

Write a Reply or Comment

Your email address will not be published.