Search code examples
webrtcstunturn

XirSys - SimpleWebRTC - I get 'Could not validate application' when doing the request to iceServers


My request to xirsys endpoint looks like this:

$.ajax({
 type: "POST",
    dataType: "json",
    url: "https://api.xirsys.com/getIceServers",
    data: {
        ident: "username",
        secret: "secret_api_key",
        domain: "dummy_subdomain.domain.com",
        application: "default",
        room: "default",
        secure: 1
    },
});

However, even if the username, secret and the rest of information seem to be correct into the xirsys dashboard, I get this error: 'Could not validate application'.

Do you have any idea ? Thank you.


Well, I tried this and I now get a 200 status, but unfortunately I get this response: {"p":"/getIceServers","s":200,"d":{"iceServers":[{"url":"stun:127.0.0.1"},{"username":"free","url":"turn:127.0.0.1?transport=udp","credential":"free"},{"username":"free","url":"turn:127.0.0.1?transport=tcp","credential":"free"}]},"e":null} Which I think is a default response.

What could I do wrong ?


Solution

  • Currently, XirSys doesn't support the posting of JSON to its endpoints. You'll need to change it to posting standard POST cars for it to work. JSON support will be added very soon.

    Regards, Lee