# Bot to create markers?

**URL:** <https://discuss.dev.twitch.com/t/bot-to-create-markers/33272>\
**Category:** Chat and IRC\
**Created:** [August 28, 2021, 8:20pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272 "2021-08-28T20:20:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![StarNab](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/starnab/32/12725_2.png) [@StarNab](https://discuss.dev.twitch.com/u/StarNab)\
**Post date:** [August 28, 2021, 8:20pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272/1 "2021-08-28T20:20:36Z")

</div>

Hello,

In my case I would like to create markers through API. But from what I understand, you need an oauth token with appropriate scopes.

But in my situation, I would like my chat bot to create those. So is there a way to accomplish this ?

The flow i’m aiming for :

- User have my bot on his channel
- User gives moderation profile to the bot
- user types a specific command
- the bot creates a marker for current timestamp

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 28, 2021, 8:21pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272/2 "2021-08-28T20:21:17Z")

</div>

Thats entirely possible.

The bot will “own” the markers.  
And chat will trigger the bot and the bot calls the API

Basically the flow you wrote is what you do.  
So you answered your own question really

The only caveate is that in order to make markers on streamers x channel, you either

- use streamer x’s token  
or
- streamer adds your bot as an editor of the channel, and the bot uses it’s own token  
or
- use an editors token of the target channel

As per:

> Markers can be created by the stream owner or editors. The user creating the marker is identified by a Bearer token.

on the docs

> **[Reference](https://dev.twitch.tv/docs/api/reference/)**
>
> Twitch Developer tools and services to integrate Twitch into your development or create interactive experience on twitch.tv.

---

<div class="post-metadata">

**Author:** ![StarNab](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/starnab/32/12725_2.png) [@StarNab](https://discuss.dev.twitch.com/u/StarNab)\
**Post date:** [August 28, 2021, 8:26pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272/3 "2021-08-28T20:26:49Z")

</div>

Ok great ! So as long as the owner gives the role, my bot will be able to create the marker ; no need for the user token

Awesome, I’ll try that  
Thanks

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 28, 2021, 8:28pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272/4 "2021-08-28T20:28:14Z")

</div>

> [@StarNab](#):
>
> no need for the user token

Well you’d still need the _bots_ user token

---

<div class="post-metadata">

**Author:** ![StarNab](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/starnab/32/12725_2.png) [@StarNab](https://discuss.dev.twitch.com/u/StarNab)\
**Post date:** [August 28, 2021, 8:30pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272/5 "2021-08-28T20:30:34Z")

</div>

Yes which is fine, I was worried It worked solely with the owner’s token

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [September 27, 2021, 8:31pm UTC](https://discuss.dev.twitch.com/t/bot-to-create-markers/33272/6 "2021-09-27T20:31:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
