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.
- Need help to integrate PayPal Standard Checkout with Shopify in PayPal Payments Standard
- Cart dropps items, fails to return customer to previous window in PayPal Payments Standard
- why can't I have auto return on standard buttons in PayPal Payments Standard
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment
- Simple Paypal button integration results in 404 error in Sandbox Environment