forked from benawad/dogehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(global): update create bot account
- Loading branch information
1 parent
825c5e2
commit beacbac
Showing
1 changed file
with
7 additions
and
15 deletions.
There are no files selected for viewing
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
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 |