APIs based on user tokens are insecure and will eventually be removed.

backpack.tf is rolling out a new set of web APIs based on OAuth. Web APIs based on user token authentication will be removed at some point in the near future. You are encouraged to update your app to use the new OAuth endpoints as soon as they become available. Please read the OAuth docs for more information.

Get API key GET /api/aux/key/v1

Retrieve your API key. You must be logged into the site with either your cookies (making this API especially suitable for user scripts) or you may provide an access token. Your current login is preferred over an access token, if applicable.

This API has no cooldown.

Documentation

Input
  • token - Your API key. Set this if you do not plan on accessing this API with your login cookies. For bots, using your access token if possible is more futureproof as cookies expire.
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • key - Your backpack.tf API key. If you do not have one, this will be null.

Get access token GET /api/aux/token/v1

Retrieve your access token. You must be logged into the site with either your cookies (making this API especially suitable for user scripts) or you may provide an API key. Your current login is preferred over an API key, if applicable.

This API has no cooldown.

Documentation

Input
  • key - Your API key. Set this if you do not plan on accessing this API with your login cookies. For bots, using your API key if possible is more futureproof as cookies expire.
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • token - Your backpack.tf access token.

Heartbeat POST /api/aux/heartbeat/v1

Send a heartbeat to backpack.tf, updating your last online time, automatic status, and bumps your listings.

This API may only be called once every 90 seconds. A Retry-After header with a Unix timestamp at which another request may be made will be provided, if the request was rate limited.

Your bot experience must not diverge from what backpack.tf Automatic provides. You must check for SteamRep and backpack.tf All Features bans, you must not decline valid offers, and you must be able to handle multiple items per offer. Treating items you are buying as currency is optional.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
  • automatic - If set to "sell", marks your sell orders as automatic. If set to "all", marks all your listings as automatic.
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • bumped - How many of your listings were autobumped.