Skip to content

Instantly share code, notes, and snippets.

@joshdabosh
Created April 27, 2021 15:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshdabosh/57eaa2ff2a86e31cf3c3c48ffe4ac156 to your computer and use it in GitHub Desktop.
Save joshdabosh/57eaa2ff2a86e31cf3c3c48ffe4ac156 to your computer and use it in GitHub Desktop.
Sets steam badge
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