Problem using Web API

Hi,

I'm playing around with the Web API trying to get the format of the request correct. The string I'm sending looks correct to me, but I keep getting a "function not found" error.

This is the string I'm sending: "method=limelm.test.echo&api_key=MyApiKey"

And This is the string I'm getting back: "<?xml version="1.0" encoding="utf-8"?><rsp stat="fail"><err code="101" msg="Method &quot;&quot; not found"/></rsp>"

Is the request not formatted correctly, or did I do something else wrong?

The error is this:

Method "" not found

Meaning it can't find a method with an empty string as a name. This tells me how you're POSTing the request URL you're not actually sending the data. If you show me the code you're using then I can give you some help.

Can you provide me with an example how do i send this request via REST client.I am trying to make requests whithin a C++ application, and i need to know what does the requests look like

You should never call the web API directly from inside an application that's distributed to end-users. Why? Because you'll need to include your API key in your app, and the API key is like a password to your account. Instead make the calls on your web servers, then pass any information you need to that script on your servers.

Make sense?

Hi Sam,Thank you for that tip. I suppose such a setup requires developers to maintain a dedicated license server to handle communication b/w their app and the LimeLM Web API, is that correct? This introduces the need for fault-tolerance behavior of the server as well. I suppose the app developer has to consider what to do if the app cannot reach the server they are maintaining for license purposes.Thanks,Arie

The LimeLM web API is separate from TurboActivate. With TurboActivate we handle all of the details (include uptime / failover / etc.). Similarly with the LimeLM web API.

However, if you want to use the LimeLM web API from your app -- why would you want to do that? -- then you must separate the actual calls to the LimeLM web API to somewhere where the customer doesn't have access. Like, for example, your webservers. Of course, now your app requires constant uptime from your servers.

But, again, why would you want to call the LimeLM web API from your app?

My thought was that I wanted to disable specific features if a user wasn't in good standing with their subscription (i.e. they hadn't paid the payment processor that month for whatever reason). So, I was planning on checking the status of the activation once a day and during initialization of the app. Is there a best-practice to implement that?

Thanks,Arie

Just use Custom license fields. And use the TurboActivate GetFeatureValue() function to get the current status of a custom license field. See: http://wyday.com/limelm/help/license-features/

But does the GetFeatureValue() function call a server? It seems like it's just a value that gets encoded into the local license file, no? If not, does it hit up a server to get the value in the custom field?

Thanks,Arie

But does the GetFeatureValue() function call a server?

No. It gets the data from the download cryptographically signed activation block.

It seems like it's just a value that gets encoded into the local license file, no?

It's a bit more complicated, but yes, that's basically what it is.

And if you want to change custom license fields, again, see: http://wyday.com/limelm/help/license-features/#change

Thanks for pointing me to that article, Wyatt. I reviewed the scenario you have there, but my concern is when a customer has what many payment gateways call a recurring profile setup for a particular product. That is, their credit card is to be debited every month according a price they pay upon checkout. For example, a user's credit card expired and the payment processor denies their payment, how can I let my app know that with LimeLM? In the scenario you present we assume the user hasn't purchased the "whole" product, so they "re-activate" when they make a new purchase, etc. But, how would the app deactivate if a user's license is on a recurring payment and their payment processor denied a payment.

Thanks,Arie

That is, their credit card is to be debited every month according a price they pay upon checkout. For example, a user's credit card expired and the payment processor denies their payment, how can I let my app know that with LimeLM?

A few ways. Firstly set your IsGenuine() call to re-check every 30 days to re-download the latest custom license field data (also, handle edge cases where the customer couldn't reverify but the data on the computer says the "subscription" has expired -- fopr example give the customer a prompt dialog).

Also, check the "subscription expires" custom license field that you create, and if the subscription has indeed expired, then don't let the customer use your app.

Next, on the renewal event, have the payment provider contact your website (e.g. PayPal IPN). On success extend the "subscription expires" custom license field to the new expiration date (use the LimeLM web API). On failure either leave the product key as-is, or revoke the key (again, use the LimeLM web API). It's up to you.

That way customers that have payed up can keep using your app. Customers that haven't, can't.

So, all the LimeLM web API stuff will be on your web server (where it belongs), and not in your app.

Does this make sense?