Answers for "javascript get name from steamid"

0

javascript get name from steamid

var xhr = new XMLHttpRequest();
    xhr.open('POST', 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key={API_KEY}&steamids=$steamid64');
    xhr.onload = function () {
        if (xhr.status === 200) {
            var json = JSON.parse(xhr.responseText);
            document.getElementById('target').innerHTML = json['response']['players'][0]['personaname'];
        } else {
            alert('Request failed.  Returned status of ' + xhr.status);
        }
    };
    xhr.send();
Posted by: Guest on July-22-2021

Code answers related to "javascript get name from steamid"

Code answers related to "Javascript"

Browse Popular Code Answers by Language