Skip to content

agent files

Payton Turnage edited this page Nov 23, 2016 · 2 revisions

graw bots use files called "agent files" to authenticate with Reddit. Agent files include five pieces of information that Reddit requires bots to provide:

  • A unique user agent
  • A client ID and secret which correspond to the bot program when it is registered with Reddit
  • A Reddit account username and password

Agent files should never be shared, or committed to a repository. It is courteous to include graw's agent file template, however.

Creating an agent file.

I recommend starting with this template.

  1. Register your the graw bot you want to use on your Reddit account by following the "Getting Started" section of Reddit's Oauth2 tutorial. Unless you know otherwise, register it as a "script app".
  2. Create a user agent for the bot (if you are using someone else's graw bot, this may be provided for you) that complies with Reddit's API Rules.
  3. Fill in the template with the user agent, app client id & secret, and the login username and password to the Reddit account the bot will control.
Clone this wiki locally