Trouble in consuming API having security?

Multi tool use


Trouble in consuming API having security?
API Document :
To access the service, you must pass a valid Authorization: header in every request.Requests that originate from your own server via a script, HTTP proxy, etc. should include a private key, which you should keep secure, as you would a password.
The complete Authorization: header with your private key is:
Authorization: privateKey ********
Requests that originate from a web browser will be blocked if they include a private key
Requests that originate from a web browser should include a public key, not a private key. Public
keys do not need to be protected, and can be distributed freely to your users.
The complete Authorization: header with your public key is:
Authorization: publicKey ***************
To make requests with a public key from a web browser, the origin domain must also be
whitelisted. We have whitelisted these domains for you:
*.****.com
API CURL:
HTTP GET: /body/{bodyId}/render
Renders the body of the news article, converting from the providers native article body format to
HTML
Example: Render one particular article body
curl
-H 'Authorization: privateKey kq8txpcbqg'
https://newsrpm.service.financialcontent.com/body/3yn3RuaDmoGuyC-uBcavppL_5
MyAOhov/render
My Code:
$.ajax({
url: "https://newsrpm.service.financialcontent.com/body/3yn3RuaDmoGuyC-uBcavppL_5MyAOhov/render
",
type: 'GET',
dataType: 'jsonp',
crossDomain: true,
secure: true,
headers: { 'Authorization': 'privateKey kq8txpcbqg' },
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa(""));
},
success: function (data) {
}
});
Error:
You are not authorized to access this service
Can someone help me to access api having authorization security ?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.