POST https://api.sandbox.paypal.com/v1/oauth2/token 401 (Unauthorized)
Error: failed [401] {"name":"AUTHENTICATION_FAILURE","message":"Authentication failed due to invalid authentication credentials or a missing Authorization header.","links":[{"href":"https://developer.paypal.com/docs/api/overview/#error","rel":"information_link"}]}
at Object.exports.makeErrorByStatus (http.js?hash=021da52f029416901f37e5c36569c737c737bcb9:261)
at XMLHttpRequest.xhr.onreadystatechange (http.js?hash=021da52f029416901f37e5c36569c737c737bcb9:211)
Regarding the error message, there is something wrong how the credentials are passed. So what it the right way to pass the credentials?