I am building an eosdapp using nodejs code.I got the wallet api from the developers portal,but when i run the code i get the following error.

{"code":500,"message":"Internal Service Error","error":{"code":7,"name":"bad_cast_exception","what":"Bad Cast","details":[]}}

The nodejs code with input data(payload11) given below.

payload11 = 
  "ref_block_num": blockno,
  "ref_block_prefix": ref_block,
  "expiration": timestamp,
  "actions": [{
    "account": "certcontract",
    "name": "issue",
    "authorization": [
      "actor": "terminatoroo",
      "permission": "active"
  "data": bindata
"signatures": []

var biz = JSON.stringify(payload11);

var options = { method: 'POST',
url: '',
headers: { 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8' },body:biz};

request(options, function (error, response, body) {
if (error) throw new Error(error);

  • I think your signature field is missing. Which page did you find this code?
    – han
    Jun 27, 2019 at 10:03

1 Answer 1


I think the issue is the payload11 variable is not valid JSON, specifically:

},    // Doesn't have a corresponding opening {
requiredkey         // Not in quotes, isn't connected to the key beneath

It should probably be something like this:

  "signatures": [],

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.