Can we test sandbox api in our website?

Wish to know how to test the sandbox api in my website.

it is woking in postman, but i tried to use HTML xmlhttprequest , but it is failing


var authorizationBasic = window.btoa(clientId + ‘:’ + clientSecret);

var request = new XMLHttpRequest();‘POST’, URL, true);
request.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”);
request.setRequestHeader(‘Authorization’, 'Basic ’ + authorizationBasic);
request.setRequestHeader(‘Accept’, ‘/’);
request.setRequestHeader(‘Connection’, ‘keep-alive’);
//request.setRequestHeader(‘accept-encoding’, ‘gzip, deflate, br’);
request.send(“{grant_type: "client_credentials"}”);

request.onreadystatechange = function () {
if (request.readyState == 4 && request.status == 200) {

Hi @hkiran2k For postman, there is already a collection available. You can use it. And also you can see how they are testing. The link is below:-

Regarding the code, can you explain what error are you getting? Thank you

Hi @hkiran2k! Our API can only accept calls coming from your backend server and will block any calls from the Client side with a CORS error.

I would recommend using one of our official SDKs for making calls to the Dwolla API via your application’s server if it’s written in one of the languages that we have an SDK for. Check out our collection - SDKs & Tools | Dwolla Payments Platform

Hope that helps. Let us know if you have any questions!