Page 1 of 1

The remote server returned an error: (401) Unauthorized

Posted: Tue Oct 08, 2013 9:28 am
by federico.botto
Hi, i created a class to test basic Wurfl Cloud.

I had created the API key, selected two Capabilities, but the response is (401) Unauthorized.

I'm using Framework 2.0 so i had adapted your demo.

The API Key is not the original that i had obtained in Account Settings.

I'm testing it on my local server with internet connection, but not on a online domain.

Thanks in advance.

Code: Select all

using ScientiaMobile.WurflCloud;
using ScientiaMobile.WurflCloud.Config;
CloudClientConfig config = new CloudClientConfig();
        config.ApiKey = "560376:OOOOOOOOOOO1yb4FNaUEXv9esRw";

        CloudClientManager manager = new CloudClientManager();
        ScientiaMobile.WurflCloud.Device.DeviceInfo info = new ScientiaMobile.WurflCloud.Device.DeviceInfo();

        string[] cap = {"wta_voice_call","is_smartphone"};
        info = manager.GetDeviceInfo(context, cap);

        _deviceId = info.Id;
        string serverVer = info.ServerVersion;
        _ServerDate = info.WurflLastUpdate;
        string lib = manager.GetClientVersion();
        _cap1 = info.Capabilities["wta_voice_call"].ToString();
        _cap2 = info.Capabilities["is_smartphone"].ToString();

Re: The remote server returned an error: (401) Unauthorized

Posted: Tue Oct 08, 2013 9:58 am
by kamermans
It can take up to a few minutes for changes to a WURFL Cloud account to propagate to all servers, is it possible that this could be the issue? Also, make sure the capabilities you selected were actually saved, because this can also be caused by having no capabilities selected.

Re: The remote server returned an error: (401) Unauthorized

Posted: Tue Oct 08, 2013 10:26 am
by federico.botto
kamermans wrote:It can take up to a few minutes for changes to a WURFL Cloud account to propagate to all servers, is it possible that this could be the issue? Also, make sure the capabilities you selected were actually saved, because this can also be caused by having no capabilities selected.
Thanks kamermans for your response.

I double checked my capabilities and they were selected and saved.
I tested again but the same 401 error msg, after an hour that configured all things.

Any other issue?

Could be a problem that i'm using Framework 2.0, or this shouldn't be a problem?

The web app is connecting and requesting..

Re: The remote server returned an error: (401) Unauthorized

Posted: Wed Oct 09, 2013 9:58 am
by federico.botto
Help please!

Re: The remote server returned an error: (401) Unauthorized

Posted: Wed Oct 09, 2013 10:02 am
by kamermans
Help is on the way! :)

Sorry for the delay, I am going to check our load balanacers to see where your traffic is going and what the issue is. Can you tell me what country you are testing the service from (your traffic is geo-routed to a nearby cluster of servers)?

Re: The remote server returned an error: (401) Unauthorized

Posted: Wed Oct 09, 2013 10:34 am
by federico.botto
Thank you!!! Sorry for my re-post!

I'm from Argentina.

Any other thing that can help you, please ask!!

Thanks in advance.

Re: The remote server returned an error: (401) Unauthorized

Posted: Wed Oct 09, 2013 11:07 am
by kamermans
I see no attempts to authenticate against our system from your API key. Can you tell me what IP you are accessing our system from so I can track down your requests? You can PM it to me if you want, for the sake of security. Also, I have tested your API key manually and it seems to be working fine.