jQuery ajax empty exeption on wordpress

As I said in the comments. The problem was on api side.

Error: (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

How to solve: Add this to .htaccess of api

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin: myUrl
</IfModule>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)