LimeLM Web API manualActivation Error 99 "The activation block failed to decode"

Hello,I am trying to set up manual activation but I keep getting error 99, "The activation block failed to decode".

I saw this posting https://wyday.com/forum/t/2158/manual-activation-error/ and followed as instructed-tried replacing all forward slash with a \/-used https://www.freeformatter.com/json-escape.html

but ended up with error 124 "Activation request XML is missing or invalid."

I am using nodeJS and here is part of the code if it helps.

var request = limeUrl + '&method=limelm.pkey.manualActivation&act_req_xml='+req.body.xmlData; axios.get(request) .then(function(response){ res.json(response.data); })Thanks

You're appending an XML block to an URL and making a GET requests.

1. Don't make a GET request. Make a POST request. We're phasing out GET requests over the web API in the near future (announcement forthcoming).

2. Send the block as part of the POST body. Right now you're appending an XML string that is not URL-encoded to an URL. Hence the error "the activation block failed to decode".

Hey thanks for the reply,I tried making a post request with everything in the body but none of the items that are in the body are being recieved as I am getting error 101 Method not Found.

Here is my post request:

var headers = { 'Content-Type': 'application/x-www-form-urlencoded' } var data={ api_key:env.limeApiKey, version_id:env.limeVersion, method:'limelm.pkey.manualActivation', act_req_xml: req.body.xmlData, format:'json' } axios.post('https://wyday.com/limelm/api/rest?',data, {headers: headers}) .then((response) => { res.json(response.data); }) .catch((error) => { res.json(error); })

This is incorrect: https://wyday.com/limelm/api/rest?

This is correct: https://wyday.com/limelm/api/rest/

Notice that the correct URL has a trailing slash (and no question mark).

Still no luck, even tried it with application/json but it doesn't work.Error 101 method not found.var headers = { 'Content-Type': 'application/json' } var data={ method:'limelm.pkey.manualActivation', api_key:env.limeApiKey, version_id:env.limeVersion, act_req_xml: req.body.xmlData, format:'json' } axios.post('https://wyday.com/limelm/api/rest/',data, {headers: headers}) .then((response) => { res.json(response.data); }) .catch((error) => { res.json(error); })

We're not familiar with the axios library. So, standard debugging principles apply:

1. Add a breakpoint to wherever axios forms the message that is sent to our servers.

2. Inspect the traffic to ensure that the data is formed correctly by axios (it's not, or you wouldn't be getting an error).

For example, type this in your browser:

https://wyday.com/limelm/api/rest/?method=limelm.test.echo

You should get "invalid API key". (Which is a success -- the method is being sent) Remove the method....

https://wyday.com/limelm/api/rest/?method=

Or...

https://wyday.com/limelm/api/rest/

You should get: Method "" not found

We don't have time to debug this for you, but this will probably help: https://stackoverflow.com/a/47630754/124805

Or this, if you're using NodeJS:

https://stackoverflow.com/a/44470344/124805

Axios doesn't support form data in NodeJS. So, use a library that is properly developed.