1

I want to return all the associated EOS accounts that is linked to a specific public key in JSON format for my javascript dapp. Currently I can paste the pub key into: https://eosflare.io/key/EOS6M1m2KBk8BF6uwEnRyjXvpBTUxqLfMUZALzsUGtrHvcEHTYFi1

But there is no JSON output. How can I just a RELIABLE EOS endpoint to do these queries to get a JSON output of all the accounts associated to a pub key?

Do I use one of these endpoints? https://www.eosdocs.io/resources/apiendpoints/

1

Yes you can query that api end points as i have performed query on this api from https://www.eosdocs.io/resources/apiendpoints/ with post parameter {"public_key":"EOS6M1m2KBk8BF6uwEnRyjXvpBTUxqLfMUZALzsUGtrHvcEHTYFi1"} and api url is

https://eos.greymass.com:443/v1/history/get_key_accounts

I am not sure but i think this can be done by eosjs also.

Here is code for js

var request = require('request');


    var Body = {"public_key":"EOS6M1m2KBk8BF6uwEnRyjXvpBTUxqLfMUZALzsUGtrHvcEHTYFi1"};
      //options for liverate api of btc,eth and eos
    var options = {
        url: 'https://eos.greymass.com:443/v1/history/get_key_accounts',
        json: true,   // <--Very important!!!
        body: Body

    };

    function callback1(error, response, body) 
    {
        console.log("in jssss");
       console.log(body);
    }        
    request.post(options, callback1);  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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