Returns all of a user's associated accounts, given their account_ids in in {ids}.
{ids} can contain up to 100 semicolon delimited ids, to find ids programaticallyprogrammatically look for account_id on user objects.
You
You can filter the network_users returned by this method with the types parameter. Specify, semicolon delimited, main_site or meta_site to filter by site.
This
This method returns a list of network_users.
As we don't have StackSnippets enabled here I created a jsFiddle to demonstrate the possible usage and included that as well in the stack snippet found below.
###Html
<div>
<label for="networkid">Your SE network ID</label>
<input id="networkid" type="text" value="4337810" />
<input id="load" type="button" value="Load" />
</div>
<div id='r'>
</div>
###CSS
a {
display: block;
}
###JavaScript:
function load(id) {
var server = 'http://api.stackexchange.com/2.2',
path = '/users/' + id + '/associated' ,
filter = 'filter=!*LCuYQnqAGqQ14Mr';
$.get(server + path + '?' + filter, function(data) {
for(var i=0; i<data.items.length; i++) {
var u=data.items[i];
$('#r').append(
$('<a></a>')
.text(u.site_name)
.prop('href', u.site_url+'/users/'+ u.user_id ));
}
});
}
$('#load').on('click', function(e) {
load($('#networkid').val());
return false;
});
a {
display: block;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>
<label for="networkid">Your SE network ID</label>
<input id="networkid" type="text" value="4337810" />
<input id="load" type="button" value="Load" />
</div>
<div id='r'>
</div>
function load(id) {
var server = 'http://api.stackexchange.com/2.2',
path = '/users/' + id + '/associated' ,
filter = 'filter=!*LCuYQnqAGqQ14Mr';
$.get(server + path + '?' + filter, function(data) {
for(var i=0; i<data.items.length; i++) {
var u=data.items[i];
$('#r').append(
$('<a></a>')
.text(u.site_name)
.prop('href', u.site_url+'/users/'+ u.user_id ));
}
});
}
$('#load').on('click', function(e) {
load($('#networkid').val());
return false;
});