I am new with blockchain services. I have created wallet using command line.

curl -X POST -d '"WalletTest"

It's created successfully.

But, I'm trying to create wallet using EOSIO RPC APIs in C++. I have used curl library for http call. But, Whenever I call, I am getting following error

2019-07-02T09:50:16.709 thread-0   http_plugin.cpp:474           handle_exception     ] Exception Details: 4 parse_error_exception: Parse Error

Unexpected char '100' in "data" {"c":100,"s":"data"} thread-0 json.cpp:437 variant_from_stream

thread-0  json.cpp:460 from_string

My C++ Code:

CURL *hnd1 = curl_easy_init();

curl_easy_setopt(hnd1, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd1, CURLOPT_URL, "");
curl_easy_setopt(hnd1, CURLOPT_POSTFIELDS, "data=MyWallet");

struct curl_slist *headers1 = NULL;

curl_easy_setopt(hnd1, CURLOPT_HTTPHEADER, headers1);
curl_easy_setopt(hnd1, CURLOPT_WRITEFUNCTION, writefunc);
curl_easy_setopt(hnd1, CURLOPT_WRITEDATA, &s);
printf("%s\n", s.ptr);
if(s.ptr != NULL)

What am I miss here? Please someone help. Thank you.


1 Answer 1


I have solved that issue. We just need to pass wallet name as string.

curl_easy_setopt(hnd1, CURLOPT_POSTFIELDS, "MyWallet");

It's works for me. May be help someone.

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.