Hi,
I downloaded the Cloud API for ASP.NET 2.x / 3.x ( http://www.scientiamobile.com/api_downl ... otNet2.zip ).
In the "DemoClient" project i adjusted the API key and the capabilities to match those configured in our account.
However, when i run the DemoClient and click on "Detect current device" I always get a 401 Error (see screenshot)
Any help would be appreciated.
Problems with the DemoClient
-
- Posts: 3
- Joined: Wed Oct 24, 2012 3:28 am
Problems with the DemoClient
- Attachments
-
- Clipboard02.png (15.23 KiB) Viewed 11362 times
-
- Posts: 3
- Joined: Wed Oct 24, 2012 3:28 am
Re: Problems with the DemoClient
Here's the code I used:
Code: Select all
using System.Web;
using ScientiaMobile.WurflCloud;
using ScientiaMobile.WurflCloud.Config;
namespace DemoClient_Base.Framework
{
public class WurflService
{
public DeviceInfoViewModel GetDataByRequest(HttpContext context)
{
var config = new DefaultCloudClientConfig
{
ApiKey = "<our api key>"
};
var manager = new CloudClientManager(config);
// Grab data
var info = manager.GetDeviceInfo(context, new[] { "is_wireless_device", "is_smartphone", "is_tablet" });
var model = new DeviceInfoViewModel
{
DeviceId = info.Id,
ServerVersion = info.ServerVersion,
DateOfRequest = info.WurflLastUpdate.ToString(),
Library = manager.GetClientVersion(),
Capabilities = info.Capabilities,
Errors = info.Errors,
Source = info.ResponseOrigin
};
return model;
}
}
}
Re: Problems with the DemoClient
Hi,
I have looked into your account and I see that you have two API keys. Both of these keys are working fine from our tests. It's possible that you're faster at programming than our service is at syncing new API keys (5 mins or so, max) Were you able to get connected? Please ensure you are copying the entire API key (6 digits, ":", then 32 chars).
I have looked into your account and I see that you have two API keys. Both of these keys are working fine from our tests. It's possible that you're faster at programming than our service is at syncing new API keys (5 mins or so, max) Were you able to get connected? Please ensure you are copying the entire API key (6 digits, ":", then 32 chars).
Thanks,
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Re: Problems with the DemoClient
Also, please ensure your server is able to make outgoing connections to *.wurflcloud.com. If you need specific hosts, you can whitelist the IPs for api.wurflcloud.com, us.wurflcloud.com, uk.wurflcloud.com and za.wurflcloud.com, although this is discouraged because they are subject to change (very rarely).
Thanks,
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
-
- Posts: 3
- Joined: Wed Oct 24, 2012 3:28 am
Re: Problems with the DemoClient
Without changing anything it works now, so it was probably something like that. The problem persisted for more than 5 minutes though.kamermans wrote:It's possible that you're faster at programming than our service is at syncing new API keys (5 mins or so, max)
Thanks for your help.
Who is online
Users browsing this forum: No registered users and 52 guests