The key is correct, in the personal account of the new mail there is an opportunity to test the request, the request is formed correctly. When I try to knock from a hosting to the API of a new mail, I see {"statusCode": 404, "message": "Resource not found"}

$(function() { var params = { "modelName": "Address", "calledMethod": "getCities", "methodProperties": { "FindByString": "Житомир" }, "apiKey": "a7a279d6f4b1c3fa6e6667b058d58904" } $.ajax({ url: "http://testapi.novaposhta.ua/v2.0/json/Address/getCities?" + $.param(params), beforeSend: function(xhrObj){ // Request headers xhrObj.setRequestHeader("Content-Type","application/json"); }, type: "POST", // Request body data: "{body}", }) .done(function(data) { console.log(data); }) .fail(function() { console.log('FAIL'); }); }); 

Help understand what's wrong

  • Already understood, copied the code sample from the new mail site and did not notice that there was to write testapi, the word test was removed, everything worked - Eugene Sukhodolskiy
  • What is new mail and how is it different from the old one? Which email provider is meant, we should guess as an exercise? - VladD

0