Skip to content

Commit

Permalink
docs(global): update create bot account
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOtterlord authored May 20, 2021
1 parent 825c5e2 commit beacbac
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions CREATE_BOT_ACCOUNT.MD
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
0. Auth with your regular account
1. Send ws message to create bot account with the username you want (you can create up to 5):
```typescript
{ op: "user:create_bot", p: { username: "mybotname" }, ref: "[uuid]", v: "0.2.0" }

// or with Kebab

wrapper.mutation.userCreateBot("username").then((response) => console.log(response));
```
2. You will receive back a message with an api key or error:
```typescript
{ op: "user:create_bot:reply", p: { apiKey: "asdoifjo1jioj1f1f2" }, ref: "[uuid]", v: "0.2.0" }
```
3. Save that api key somewhere safe (I will be adding a UI for this but it doesn't exist atm)
4. Send a POST request to `https://api.dogehouse.tv/bot/auth` with a JSON body `{ apiKey: "asdoifjoqefjo" }` (make sure to set the header: `content-type` to `application/json`) and it will return an `accessToken` and `refreshToken` for that bot account.
0. Sign in to your account
1. Head to [developer settings](https://dogehouse.tv/developer/bots)
2. Click `Create bot`
3. Enter the name of your bot
4. Click create bot
5. Go to the bot and click `Copy` to copy your API key
6. You now have a bot account! Use the API key to authenticate your bot

0 comments on commit beacbac

Please sign in to comment.