Created
April 27, 2021 15:01
-
-
Save joshdabosh/57eaa2ff2a86e31cf3c3c48ffe4ac156 to your computer and use it in GitHub Desktop.
Sets steam badge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function change(token, v){ | |
// @token is the steam access token. you can send a dummy change badge request to find this | |
// @v is protobuf encoded. ex: EAF=, or {"2":1} | |
// if you want to have no steam badge shown, pass it as "EAA=", which decodes to {"2":0} | |
let f = new FormData(); | |
f.append("input_protobuf_encoded", v); | |
return fetch("https://api.steampowered.com/IPlayerService/SetFavoriteBadge/v1?access_token="+token, { | |
method:"POST", | |
mode:"no-cors", | |
body: f | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment