Nodejs - HTTP call return "UNSUPPORTED_MEDIA_TYPE" error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone.
I'm trying to integrate Paypal inside my Node.JS application.
I've already made a successful API call for the Oauth2 token, but when I'm trying to call something else (for example '/v1/billing/subscriptions/'). The paypal API return an error saying :
name : "UNSUPPORTED_MEDIA_TYPE"
message : "The server does not support the request payload's media type".
I'm guessing this have to do with the "Content-Type" and "Accept" variable from the HTTP header. Even by following the Paypal API documentation (https://developer.paypal.com/docs/api/reference/api-requests/#http-request-headers), or Even if I try "application/json", "application/x-www-form-urlencoded' and also tried to stringified my Body data. Nothing work.
Does someone can share their working http header, to see if i'm doing anything wrong ?
Thank you very much for your help.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Customising Paypal Checkout Button in PayPal Payments Standard
- Issue with Empty store_info in Response Using /v1/reporting/transactions on Sandbox API in REST APIs
- How do I update shipping in the popup when using onShippingAddressChange() in REST APIs
- Add Others data in SDKs
- I want to implement subscription functionality. in REST APIs