Reputation: 2422
I am trying to call this SMS API from 2factor
This is the code, I am getting CORS issue
var settings = {
"async": true,
"crossDomain": true,
"url": "http://2factor.in/API/V1/293832-67745-11e5-88de-5600000c6b13/SMS/991991199/AUTOGEN",
"method": "GET",
"headers": {},
"data": "{}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Code can be found here - Sample Code How to make http get request with CORS enabled
Even if I use 'jsonp', I am getting
unexpected token ':'
How to solve this
Upvotes: 1
Views: 125
Reputation: 528
You have 2 problems in you sample request, please check this first.
Upvotes: 1