#topgg-api

1 messages ยท Page 20 of 1

ruby geode
#

about that

dull otter
#

If you haven't sent an application yet, you can add a bot and send an application on the site

dull otter
#

Yes

ruby geode
#

i see

#

Thank you for helping direzon!

dull otter
#

Np, I'm glad I was able to help

ruby geode
remote ivy
#

๐Ÿ‘‹ Hello there!

#

I would like to know please, how to get access to your api? I would like to track when users vote for my server on the website and give them rewards through my bot. Only my server is listed on top.gg, my bot isn't public

vestal wasp
#

bot settings > webhook

#

servers don't have yet iirc

woven coral
#

should be fixed in my fork, its styling is a bit wacky atm

steep vigil
#

i use localhost endpoints and then ngrok to get a public url for em

lapis forge
#

oh I suppose that would do

steep vigil
#

Ngrok is like stupidly easy to setup

lapis forge
#

hah
fair

neat hamlet
#

Yo man I got some good plays tonight

#

So far I have gotten the extension to work and it is able to monitor activity

remote ivy
#

๐Ÿ’ help please!

Does anyone knows if the API is available for listed servers? I don't find how to get the api token.
I would like to connect the api to my bot, so I can track user activity and reward accordingly

runic creek
#

I don't think so

woven coral
#

maybe in v1

tight smelt
#

Hi! Iโ€™m the developer of Task.gg @modern sandal.
Iโ€™d like access to the top.gg API so I can fetch the live server count for my workspace site.

gloomy wasp
#

-addbot

#

damn

#

tuff

#

-api

#

i dont even get that one huh

gloomy wasp
tight smelt
#

I cant find it

#

Guys where can I get my discord bot api?

#

I want to make rhe server count show in my website

dull otter
#

Press "reveal" and the token will appear

steep vigil
tight smelt
long vector
#

how to get topgg token

steep vigil
steep vigil
long vector
steep vigil
#

-howlong

long vector
#

-howlong

steep vigil
#

1 sec

long vector
steep vigil
#

-upto

steady bane
woeful elk
#

?

jovial pilot
#

Is there a way to use the top.gg api to get webhook notifications when someone gives your bot a review? this would be helpful so I know when to add a new review to my website

sand oxide
#

Any progress yet mate? @jovial pilot

jovial pilot
sand oxide
#

Have you gotten your Api yet? @jovial pilot

jovial pilot
sand oxide
#

Yes mate they is

#

Are you in need of it?

jovial pilot
#

yeah

sand oxide
#

Feel free to Hite me via D M For it @jovial pilot

jovial pilot
#

why tf would I hire you

#

im literally asking for an api

sand oxide
#

I know

jovial pilot
#

its not that deep

#

if you have the api then just send it to me bro

sand oxide
#

OK

#

Are you here? @jovial pilot

runic creek
hoary zenith
#

h

ember elk
#

can we get rosbot for d3 here?

cerulean flame
#

-howlong

signal harness
abstract mothBOT
#

@cerulean flame

topgg When will my bot be reviewed?

Our current average review time is 1-2 weeks.

Some bots may take longer to review than others depending on their features. Because of this, we can't guarantee your bot will be reviewed as quickly as someone else's, and there's no exact timeframe for approval. There's also no way to check your position in the queue โ€” but remember, you're not first or last!

You're free to edit your bot's page anytime, both before and after review. This won't affect your place in the queue.

You can read more about our review process here: How the Reviewing Process Works.

topgg_ico_bulb In the meantime, please make sure your bot follows all of our Bot Guidelines for a quick and smooth approval!

hidden totem
#

Hi! I want to make my bot check if there any bots added to Top.gg and block those that are not listed. Is this possible, can I connect the API to my bot? And if so, how?

dense crater
#

-upto

inland bridge
#

-howlong

long vector
#

-howlong

#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

long vector
#

-upto

runic creek
#

Normal users can't use tags

#

Only staff/reviewers

ember elk
#

If ros-bot for d3 still exist, how can we get it? TY

radiant copper
#

-upto

#

-upto

warped spoke
#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

warped spoke
#

-ping

abstract mothBOT
warped spoke
#

-userinfo @signal harness

abstract mothBOT
#
ยป Username

sudo_william#0

โ€‹

โ€‹

ยป ID

884516044151083079

ยป Nickname

SudoWilliam

โ€‹

โ€‹

ยป Highest Role

Reviewers

ยป Badges

โ€‹:tier1: :Bravery:

ยป Joined Server

<t:1666809571:F> <t:1666809571:R>

ยป Creation Date

<t:1630955458:F> <t:1630955458:R>

ยป Boosting Since

Mon, Jun 9, 2025 9:17 PM (a month ago)

magic iron
#

?help

#

-ping

abstract mothBOT
magic iron
#

-invite

#

-add

radiant copper
#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

radiant copper
#

-ping

abstract mothBOT
radiant copper
#

-botinfo

abstract mothBOT
#

downvote You need to provide a bot to find

radiant copper
#

-userinfo

#

-upto

brazen cobalt
#

-userinfo

rain heart
#

Bruh

chrome steeple
#

n+help

lapis granite
#

-userinfo

sick hatch
#

-userinfo

zenith charm
#

woow whats this

#

-userinfo

dapper copper
#

-userinfo

smoky dew
#

-help

#

-botinfo

#

-ping

abstract mothBOT
brazen cobalt
#

-ping

abstract mothBOT
brazen cobalt
#

-userinfo

quartz tangle
#

-userinfo

keen sleet
#

-userinfo

narrow gyro
#

-userinfo

signal harness
#

-userinfo

steep vigil
#

-userinfo

rain heart
runic creek
#

This channel is dead anyway, might as well use it for commands kappalul

jaunty plank
#

!help

novel yoke
#

-userinfo

warped spoke
#

-botinfo

abstract mothBOT
#

downvote You need to provide a bot to find

warped spoke
#

-botinfo @abstract moth

#

-botinfo @jade falcon

empty gazelle
quartz tangle
mighty pike
peak pike
#

-userinfo

sudden forge
#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

sudden forge
#

-usereinfo @sudden forge

#

-userinfo

abstract mothBOT
#
ยป Username

iamnotprop#0

โ€‹

โ€‹

ยป ID

886900155536797748

ยป Nickname

None

โ€‹

โ€‹

ยป Highest Role

@everyone

ยป Badges

โ€‹:Bravery:

ยป Joined Server

<t:1753461277:F> <t:1753461277:R>

ยป Creation Date

<t:1631523875:F> <t:1631523875:R>

long vector
#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

long vector
#

-serverinfo

abstract mothBOT
#
ยป Server Name
โ€‹

โ€‹

ยป Server ID

264445053596991498

ยป Total Members

160,131

โ€‹

โ€‹

ยป Verification Level

Extreme

ยป Owner

top.gg_#0

โ€‹

โ€‹

ยป Total Roles

75

ยป Channels

500

โ€‹

โ€‹

ยป Boost Tier (19)

Tier 3 :level3:

ยป Server Creation Date

<t:1483119014:F> <t:1483119014:R>

ยป Luca's Join Date

<t:1483206530:F> <t:1483206530:R>

long vector
#

-botinfo

abstract mothBOT
#

downvote You need to provide a bot to find

long vector
#

-botinfo 1045379177953624104

abstract mothBOT
#

All-in-One Discord Bot | 220+ Features | Auto Systems, AI, Giveaways, Moderation & More | Sleek UI & 24/7 Support

ID

1045379177953624104

Username

PROTON

Prefix

?

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

ai, chatbot, fun, giveaways, moderation, utility

Owners

@long vector

trail minnow
#

-botinfo 1398132901614194788

abstract mothBOT
#

ChatWarden โ€“ Replaces your f-bombs with โ€œfluffโ€ and bans troublemakers before you blink.

ID

1398132901614194788

Username

ChatWarden

Prefix

!

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

automoderation, chat-guard, moderation-bot

Owners

@tribal dock

jaunty zodiac
#

-botinfo 1392252316995944479

abstract mothBOT
#

A bot that connects servers

ID

1392252316995944479

Username

teleline

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

bird, fun, games, teleline

Owners

@jaunty zodiac

keen sleet
#

-botinfo 1370983412197884046

abstract mothBOT
#

Cute casino bot with blackjack, hilo, three card poker, caribbean stud, jacks or better, war, mines, tower + complete virtual economy!

ID

1370983412197884046

Username

zonki

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

casino, casual, economy, fun, game

Owners

@keen sleet

chrome steeple
#

-botinfo 850836703949750282

abstract mothBOT
#

Create, manage, and customize Discord giveaways with advanced features, role requirements, and comprehensive moderation tools!

ID

850836703949750282

Username

Winnsy

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

community-events, customization, events, events-manager, fun, giveaway, hosting, logging, prize, utility

Owners

@chrome steeple

gritty shale
#

-botinfo 1327479686321934458

abstract mothBOT
#

Um bot de administraรงรฃo feito para aumentar a seguranรงa do seu servidor com muita diversรฃo e praticidade.

ID

1327479686321934458

Username

MightWard

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

adimistrativo, automoderation, moderation, seguridad, suporte, suportebot

Owners

@gritty shale

sudden breach
#

-botinfo 1344749625034280992

abstract mothBOT
#

Hey there, I'm Yolkie the small duckie! I have multiple functions!

ID

1344749625034280992

Username

Yolkie

Prefix

&

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

all-in-one-bot, currency, fun, levelrankleaderboard, moderation, utility

Owners

@sudden breach

gritty shale
jaunty zodiac
#

-botinfo 1392252316995944479

abstract mothBOT
#

A bot that connects servers

ID

1392252316995944479

Username

teleline

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

bird, fun, games, teleline

Owners

@jaunty zodiac

rain heart
#

where moddum

worldly nacelle
#

how to listen to votes chat? im trying to listen using this system

import Topgg from '@top-gg/sdk';
import Env from 'libs/env';
import express from 'express';
import { Log } from 'utils/log';

const app = express();
const webhook = new Topgg.Webhook(Env.Required('topgg_auth'));

app.post(
  '/topgg-webhook',
  webhook.listener((vote) => {
    Log(`New vote received from user: ${vote.user}`);
  }),
);

app.listen(Env.Default('website_port', 3000));```
but it just doesnt work
#

i click send test and nothing happens :/

#

fixed it, allg chat

leaden linden
crisp stream
#

-botinfo 1026133323023654932

abstract mothBOT
#

Collect your favorite K-pop Demon Hunters moments and share them with everyone on Discord!

ID

1026133323023654932

Username

K-pop demon hunters collection

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

anime, art, entertainment, fun, images, social

Owners

@runic imp

steep vigil
#

-bi 1322305662973116486

abstract mothBOT
#

The most feature-rich Discord bot for Geocachers!

ID

1322305662973116486

Username

Tracker

Prefix

!

Server Count

0 servers

Monthly Votes

66 monthly votes

Total Votes

163 total votes

Tags

geocache, geocaching, geocachingcom, hobby, starboard

Owners

@steep vigil

tidal idol
steep vigil
dreamy crane
#

-bi 1391116500093374545

abstract mothBOT
#

๐ŸŒ Real-time earthquake alerts by region and magnitude. Stay informed, stay safe โ€” worldwide.

ID

1391116500093374545

Username

Earthquake Alerts

Prefix

/

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

alerts, earthquake

Owners

@dreamy crane

dreamy crane
#

wah my embed is so ugly tho

dreamy crane
proud field
#

hi all, usin topggpy w/ autopost but getting the following eror:

Ignoring exception in auto post loop:
Traceback (most recent call last):
  File "/path/to/venv/lib/python3.11/site-packages/topgg/client.py", line 151, in _auto_post
    await self.post_guild_count(
  File "/path/to/venv/lib/python3.11/site-packages/topgg/client.py", line 212, in post_guild_count
    await self.http.post_guild_count(guild_count, shard_count, shard_id)
  File "/path/to/venv/lib/python3.11/site-packages/topgg/http.py", line 192, in post_guild_count
    await self.request("POST", "/bots/stats", json=payload)
  File "/path/to/venv/lib/python3.11/site-packages/topgg/http.py", line 171, in request
    raise errors.ServerError(resp, data)
topgg.errors.ServerError: Internal Server Error (status code: 500): {"message":"An unknown error occurred, sorry!"}

any idea what this might b caused by? thanks!!

steep vigil
#

Are you using the official one or a 3rd party rewrite

steel sentinel
#

is there a c# wrapper for the topgg api?

steep vigil
#

Not officially

proud field
#

(published as topggpy in pypi)

steep vigil
#

That one is very outdated and rather broken

#

If you want a link to the rewrite I use feel free but otherwise I can't help you

proud field
#

yeah please ๐Ÿ™

steep vigil
proud field
#

AttributeError: module 'topgg' has no attribute 'DBLClient'. Did you mean: 'Client'?

#

right the docs directory

#

didnt see that lol

steep vigil
#

They're made for this rewrite

proud field
#

oh cool

steep vigil
#

For example:
Setup:

import topgg

import os

async with topgg.Client(os.getenv('TOPGG_TOKEN')) as client:
  # ...

Auto poster:

@client.autopost_retrieval
def get_server_count() -> int:
  return bot.server_count

@client.autopost_success
def success(server_count: int) -> None:
  print(f'Successfully posted {server_count} servers to the API!')

@client.autopost_error
def error(error: topgg.Error) -> None:
  print(f'Error: {error!r}')

client.start_autoposter()

# ...

client.stop_autoposter() # Optional
proud field
#

but no actual docs lmao das fire

#

ye

#

is there the equivalent of the post_shard_count option in this version

steep vigil
#

I only needed it for vote webhook which has a whole premade example at the bottom but should probably start auto posting

steep vigil
#

Else if you need help you can ping the person that actually made it who sent the message link I posted earlier

#

I need to sleep it's 1am gah dam

mellow pagoda
#

Is it just me or is /stats not returning the right shard_count (well, it just returns null) even if i set it via the POST request? Thonk

nova vortex
#

-botinfo 1388169772298145963

tulip steppe
#

-botinfo 1385912599350087690

empty gazelle
empty gazelle
#

Npnp

white blaze
#

Hello

#

Developer

thin hound
#

-botinfo 1026133323023654932

empty gazelle
frank hearth
#

What can I use the API for?

gusty locust
#

vote rewards, vote reminders, shard/server count posting to the site, etc

empty gazelle
#

@grand acorn@ocean sparrow use commands in #commands pls

ember elk
#

how to get ros-bot foe d3?

steep vigil
steel sentinel
#

question: in the dotnet-sdk in the Objects - IBotStats if you have an IReadonlyList<int> for the shards why do you need the ShardCount couldn't you get that count from the Shards?

trail minnow
# steel sentinel question: in the dotnet-sdk in the ``Objects - IBotStats`` if you have an ``IRea...

Bro, technically yeah you can get the count from Shards.Count, but thatโ€™s just the shards this bot is running. ShardCount is more like the total shards overall, like in the whole system.

For example, this bot might be running shards [0, 2, 4], so Shards.Count is 3, but globally there are 5 shards, so ShardCount is 5.

It's not extra info, it's just telling you how many shards exist overall, not just what this bot is handling. Makes it easier to know the full context. That's why both exist.

steel sentinel
#

what css lib is top.gg using - tailwind?

mint vault
tardy ocean
#

where i can find my bot top gg api key?

steep vigil
tardy ocean
steep vigil
#

yeah no chatgpt doesnt know shit

tardy ocean
steep vigil
#

read

tardy ocean
#

Ok thx will try

steep vigil
#

assuming youre on windows

#

open command prompt and run this:
curl -H "Authorization: YOUR_API_KEY" "https://top.gg/api/bots/BOT_ID/check?userId=USER_ID"
where YOUR_API_KEY = your api key, BOT_ID = your bot's ID, USER_ID = the user ID to check

tardy ocean
#

Ok thx will try to add it later

steep vigil
#

so for example just to show it works

steel sentinel
runic creek
mint vault
remote ivy
#

I have a question. Is the api now available for servers? Or still only for bots?

remote ivy
inland swallow
#

Other than that idrk

remote ivy
vital anvil
remote ivy
# vital anvil what kind of api would you want

Well, it would be nice to have the possibility to track when users vote for the server.
So the api should track the user activity when voting and communicating with my bot, so I can give rewards to users who vote for the server.

vital anvil
#

makes sense :)

dapper copper
remote ivy
scenic gazelle
#

Why does this return nothing https://top.gg/api/bots/1361826543478767848/votes when I have votes

#

-botinfo 1361826543478767848

abstract mothBOT
#

Your new favorite Discord bot with fun games, powerful tools, and smart features to energize your server!

ID

1361826543478767848

Username

Lemonade

Prefix

/

Server Count

2 servers

Monthly Votes

2 monthly votes

Total Votes

2 total votes

Tags

embed-creator, engagement, fun, games, wordle

Owners

@scenic gazelle

scenic gazelle
runic creek
#

/votes api route doesn't work properly

#

As for the number of servers, the website displays what you send it via the API

boreal flower
#

Which it says 2, until you update it

scenic gazelle
runic creek
#

It depends on why you needed the information from this route

#

You can check if someone voted with /check route

scenic gazelle
#

Will the /votes be fixed?

runic creek
#

Knowing top.gg, probably not anytime soon, if at all. The first mentions of this endpoint not working properly appeared about 3 months ago

steel sentinel
#

do the votes influence where the bot lands in the list?

runic creek
#

Pretty much, yes

onyx shore
runic creek
#

Huh?

scenic gazelle
scenic gazelle
#

Is top.gg webhook connectable with botghost?

steep vigil
scenic gazelle
steep vigil
scenic gazelle
#

I spent too long

steep vigil
#

I've never used botghost so don't know how it works but can you make it get a webhook URL or can you make it run like fastapi or smth?

scenic gazelle
#

just depends on how you set it up in the API block

steep vigil
#

Well if you generate a webhook URL or a URL that your bot monitors then you can use webhooks

frail thistle
#

Is there a timestamp for when person voted?

mint vault
mint vault
zealous light
#

Ok

cursive sleet
#

Yo

native umbra
#

Is there a way to test stuff with like test votes?

lone frigate
native umbra
#

testing takes multiple runs alts are not enough

lone frigate
#

ah

#

u use api to integrate the topgg vote counter in bot

#

so it's not possible

runic creek
lone frigate
#

hmm

#

i really need to read everything again

native umbra
#

ohh thanks I'll see

eternal elbow
#

-botinfo 1151510752390303785

steel sentinel
#

-botinfo 1327198859788554251

young basin
#

-botinfo 1215747495360069753

honest jewel
#

-botinfo 1400621459109449810

buoyant crow
#

-botinfo 1389919150981255241

rain heart
#

Bruh

honest jewel
#

-botinfo 1400621459109449810

#

server count 0 bro what

#

cap

rain light
#

-botinfo 1275917099654709418

#

-bi 1275917099654709418

mint vault
#

People have a hard time reading these days

rain heart
#

Very

boreal flower
rich crater
#

@boreal flower I agree.

scarlet dome
#

-bi 1340917960621162557

scarlet dome
#

any idea whats going on

boreal flower
#

I wouldnโ€™t know, I have mine as a command using the top gg npm package for it

scarlet dome
#

i guess ill install the library next time

#

got really lazy

#

wait i forgot to call my function (works now)

warm dirge
#

-bi 1401625818727448726

#

Meh

crisp stream
#

-bi 1385110408054046791

rain heart
#

Duuude

mint vault
#

crazy

#

@jaunty plank is it possible to maybe ban that command here or something? KEKW

jaunty plank
#

I'll just start handing out mutes ^-^

mint vault
#

even better

rare geyser
scarlet dome
#

i just forgot to call the function i wrote my code in

rare geyser
#

Mine was really a mess to understand, success 200, called every 30minutes yet no stats, switched to top gg auto poster and everything worked instantly

keen raft
#

-bi 1364176331176415282

rain light
#

-bi 1275917099654709418

mint vault
#

Or are you just trying to advertise your bot that is against the Spotify/YouTube ToS hence against Discord's as well? lmao

rain heart
#

@jaunty plank please hand out mutes uwu

jaunty plank
#

-m @rain light 1d using the api channel for Luca commands

#

Fuck is that still broken

jaunty plank
#

๐Ÿ‘€

runic creek
#

XD

#

At least now we know they are doing it on purpose to advertise their bot

#

Another reason why commands should only be available on #commands ๐Ÿ˜”

young basin
#

-botinfo 1146915838721544292

mint vault
#

@jaunty plank next candidate

jaunty plank
boreal flower
# mint vault

They left the server, the fact theyโ€™re pushing the blame for their own actions, using channels outside of what theyโ€™re supposed to be used for is silly behaviour ๐Ÿ˜ญ

mint vault
mint vault
#

Sometimes people overreact

#

ยฏ_(ใƒ„)_/ยฏ

#

It's unfortunate because I appreciate the work people do with their bots

#

Even music bots, people may not be aware that they're against Discord's ToS - so instead of overreacting, could've maybe asked why and if it's really against Discord's ToS

#

Or just live with a 1 day mute, like come on...

boreal flower
#

If youโ€™re gonna misuse channels then live with the mute itโ€™s really that simple ๐Ÿ˜‚

autumn roost
#

Hey guys, good morning, can someone help me to add one character to mudae? Is it possible?

mint vault
autumn roost
#

Oh, sorry

lunar gyro
#

how to get my user token?

#

i tried using this, got 401s

steep vigil
lunar gyro
steep vigil
#

Or making sure it's correct

lunar gyro
steel sentinel
#

did you verify that they are both the same?

steep vigil
#

Just make sure they're both identical

lunar gyro
vapid cape
lunar gyro
# vapid cape how are you making the request?
  curl --request POST \
  --url https://top.gg/api/bots/916775039263715349/stats \
  --header 'Authorization: eyJhbGciOiJIUzI1NiIs~~~~~' \
  --header 'Content-Type: application/json' \
  --data '{
  "server_count": 164444
}'
vapid cape
#

try the other endpoints, for example GET /bots to test if the token works

lunar gyro
#

i am 100% everything is correct

vapid cape
lunar gyro
vapid cape
naive grotto
#

How to use api for voters means if anyone vote our discord bot in top.gg then bot will send message to discord server that this user has vote bot_name

#

-help vote

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

naive grotto
#

-botinfo

abstract mothBOT
#

downvote You need to provide a bot to find

naive grotto
#

-botinfo fixton

abstract mothBOT
#

cross I couldn't find that bot listed on our site! It may not have been approved yet

runic creek
#

Alternatively, if you only want to receive messages when someone votes for your bot, you can use a page created by one of the moderators, which is https://webhook-topgg.com/

lilac verge
#

in webhooks, can i just put anything? im confused.

#

-botinfo Echo

abstract mothBOT
#

cross I couldn't find that bot listed on our site! It may not have been approved yet

lilac verge
#

wha

rain heart
#

Bruh

lilac verge
#

๐Ÿ˜ญ

rain heart
lilac verge
#

oh shit, my b, im not in here much at all

#

didnt even know thats a channel

rare geyser
#

Anyone experienced cases where you'd get a double upvote webhook in a matter on 2 seconds ?

#

Seems i get these rarely but time to time

#

nvm happened instantly not 2 seconds

signal harness
#

I know if the system think it fails it will send another one, but I can forward this to our team if itโ€™s thinking it failed but it didnโ€™t

restive otter
signal harness
restive otter
#

Okay, annoying it shows up as if its possible on the documentation then.

signal harness
#

ya not sure why that is, can work on getting that removed

restive otter
#

haha okay, orrrr get the api to work for servers too? :)

I feel like this should be a basic feature tbh. Some server lists started not so long ago support this.

#

Btw, I try to post my membercount to top.gg for server. But I don't understand where I can get the token.

signal harness
#

you can't unless you have a bot

#

and im not sure if posting stats is working at the moment

restive otter
#

Yes I have a bot made for it.

signal harness
#

then its under edit and webhook

restive otter
#

Servers don't show a webhook option ;/

signal harness
restive otter
#

hm

signal harness
restive otter
#

I do have a bot on the list, so I can just take one of my bot's to post for my server?

signal harness
#

not sure what you mean

#

and where do you see on the docs that you can do this

restive otter
#

It shows 0 members in my server

#

What I understood is that I need to push this myself?

signal harness
#

yes, I don't think you are able to post stats for that at the moment. The top.gg bot you invite is supposed to update it but doesn't that is an issue we are aware of.

restive otter
#

aha okay

signal harness
#

you need to go under edit under this bot and then you can get the auth key

restive otter
#

okay and using this token I could post the server user count or only bot server count?

signal harness
#

I don't think you can post server count as I don't see any docs supporting it

restive otter
#

okay

#

ye I tried and got TopGGAPIError: 500 Internal Server Error

vital anvil
vestal wasp
#

how long does topgg wait?

#

I think the request timeout could be a little longer as I had issues with duplicates intermediately as well

runic creek
rare geyser
#

How's that possible if I get both during the exact same timeframe ?

#

The timestamp were literally the same second with a few milliseconds off

#

Looked at my db and seems it happened 3 times in total

#

But it's all good now, added a deduplication bucket at the db level

vestal wasp
#

all the same few milliseconds as well

dusk linden
#

Is there any way for check reviews in the website?

runic creek
#

Not really

elfin marlin
#

I canโ€™t see any webhooks related to like comments, is there going to be anything like that in the future?

mint vault
#

highly likely not, for the same reasons that the reviews/comments are not exposed to the API

outer mason
#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

drifting wadi
vital anvil
#

Thats intended, the weekend counts as two votes

drifting wadi
vital anvil
#

years

#

before my tenure even

analog beacon
#

-serverinfo

abstract mothBOT
#
ยป Server Name
โ€‹

โ€‹

ยป Server ID

264445053596991498

ยป Total Members

160,525

โ€‹

โ€‹

ยป Verification Level

Extreme

ยป Owner

top.gg_#0

โ€‹

โ€‹

ยป Total Roles

81

ยป Channels

365

โ€‹

โ€‹

ยป Boost Tier (17)

Tier 3 :level3:

ยป Server Creation Date

<t:1483119014:F> <t:1483119014:R>

ยป Luca's Join Date

<t:1483206530:F> <t:1483206530:R>

steady sluice
#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

steady sluice
#
const signature = req.headers['authorization'];
              if (!this.verifySignature(body, signature, process.env.TOPGG_WEBHOOK_TOKEN)) {
                return res.writeHead(403).end('Invalid signature');
              }

will this work for auth?

mint vault
#

It's just an == check that you need to do

steady sluice
#

ow

dusk linden
#

Yeah its like overcomplicating things xd

mint vault
#

it's not even that, it's just not working

rain heart
#

Chatgpt ahh code ngl

scarlet cobalt
dusk linden
#

So... when does weekend start exactly? Yesterday morning at europe was already weekend it seems. So i assume Friday and Saturday? Is Sunday also weekend?

#

i mean weekend for vote related things

runic creek
dusk linden
#

Thanks

dusty jewel
#

how to get api topgg ?

mint vault
delicate moth
#

why i get bad request 400 when i use api.getVotes()

fallow heart
#

A

elfin marlin
#

API having issues currently? Getting 500 responses

waxen vale
#

What is this API?

mint vault
minor remnant
#

-ping

abstract mothBOT
dusty wadi
#

hey

brisk flame
#

I wanna do some vote rewards for my bot with the webhook this specificly what infomation does it send with its request?

brisk flame
#

cheers

restive sandal
#

how can i get API token for my bot?

cosmic vine
runic creek
#

Click edit and check out the "webhooks" tab

restive sandal
#

:))

runic creek
#

You can edit the bot from its "main" page or from your profile iirc

marble bramble
#

Go to webhook section you'll see "token for this bot" and click on reveal and you are good to go

restive sandal
dusk yacht
#

So I'm currently linking a webbook to my bot as I'm going to host a giveaway. And I wanted to try it by running the send test button in the webbooks but it said this in the picture does that mean it didn't work?

#

To make it only voters able to enter the giveaway

#

I alone can't test it as I recently voted

#

Figured it out

brisk flame
#

Im trying to setup the togg webserver i sent a test request to see what infomation i got back but only got this
{"user":"530367361224540190","type":"test","query":"","bot":"1409127932600778804"}

i thought isWeekend should also be sent too

runic creek
#

It is sent but it doesn't exist in the test vote afaik

brisk flame
violet mountain
#

will it also list votes that expired (12 hours after vote) ?
https://top.gg/api/bots/BOTID/votes

prime canyon
#

hello

violet mountain
runic creek
#

This endpoint even work?

mint vault
#

doesn't exist

violet mountain
runic creek
#

/vote route?

violet mountain
violet mountain
runic creek
#

Nevermind, /votes return empty array right?

violet mountain
mint vault
violet mountain
#

Bc it didnโ€™t work ( obviously bc of the typo)

violet mountain
#

what api do i use to push server count?

#

bc i cant find it

runic creek
violet mountain
steep vigil
#

yes

rare geyser
#

What does 'you cannot use this endpoint' mean ?

#

Does that mean it is just completly blocked, or does that mean it will work but only return the last 1000 and not more ?

runic creek
#

It doesn't work for now anyway afaik

patent ore
#

-botinfo 1398955028487864390

abstract mothBOT
#

A bot that lets you download TikTok videos without a watermark in seconds.

ID

1398955028487864390

Username

Tiks Save

Prefix

/

Server Count

0 servers

Monthly Votes

11 monthly votes

Total Votes

17 total votes

Tags

tiktok, tiktok-bot, tiktok-save

Owners

@patent ore

runic creek
patent ore
crisp stream
#

can the new feature "command" upload parameter such as optional text input/select menu ?

main tiger
#

I am making an api call and even though there is at least one user who had voted for the bot it stills gives me an empty list. Is the api working?

runic creek
#

If you mean this endpoint then it looks like it's still broken

main tiger
#

is this a temporary issue?

#

or is it like that for some time now

runic creek
#

A few months at least I would say

main tiger
#

oh then I will need to use something else

#

wait so that means there is no way of seeing all users who have currently voted?

runic creek
#

You can use an endpoint responsible for checking a single user (you have to be careful about the ratelimit) or use webhooks to receive requests that someone has voted

main tiger
#

yeah so there is no way of seeing a list of all users who have voted alright

runic creek
#

Probably, yea

main tiger
#

thanks for the help I guess I will switch to webhooks

dusk linden
#

So... Im using the new endpoint for uploading commands from my bot. However, subcommandgroups and subcommands aren't showing. Is there any way i can simulate this type of commands for topgg?

steep vigil
#

Not yet

#

The functionality is being worked on I yhink

#

Or not

#

Soon

violet mountain
#

or what api do i use to give out a role when someone votes for my bot

runic creek
#

Webhooks have always been the preferred way to receive this information afaik

violet mountain
#

ill look into it again :)

#

thanks!

#

are we allowed to use a api once every 10 minutes? or will we be rate limited

runic creek
violet mountain
dusk linden
#

Can we add different bot descriptions and headlines to our bots for different localizations/languages?

#

maybe with a lang property on the html elements? I dont know if thats possible

neon sky
#

how to use the server count

#

@runic creek

untold sparrow
#

@neon sky what language is your bot it

neon sky
untold sparrow
boreal flower
violet mountain
untold sparrow
untold sparrow
violet mountain
boreal flower
neon sky
#

@untold sparrow

untold sparrow
#

download npm

neon sky
#

from github?

#

am sorry am too dumb for this api stuff

#

topgg api is different for me

neon sky
untold sparrow
neon sky
#

node.js

untold sparrow
neon sky
#

i used a vps to host the bot

neon sky
#

@untold sparrow am i cooked because i use a vps

untold sparrow
neon sky
#

how will i host it then

#

or no need of alldat

#

does it get locally?

untold sparrow
# neon sky does it get locally?

I unfortunetly don't have the time availible right now to get into anything nitty gritty. All I can offer is the video I sent. It should have enough information to go from

steady night
#

Is there any webhook for reviews?

runic creek
#

Nope afaik

steady night
#

Mmm would be cool if they considered adding

mint vault
#

There likely won't be any for the same reason they're not exposed to the REST API

steady night
#

Probably because people would do review automation but I'm moreso looking for a webhook for when a review is made

mint vault
#

Yeah, and that likely won't be the case for the reason mentioned above

steady night
#

There's nothing malicious about that and incentivizing reviews wouldn't rly differ from the upvoting flow

runic creek
pastel scarab
#

Is this where we request an API?

runic creek
#

You don't request it, you can access it if you have an approved bot on the website

worn dirge
#

?verify

verbal pecan
#

hey

steady sluice
runic creek
#

They left the server

steady sluice
#

^
linux

  • sudo apt update
  • sudo apt install -y nodejs npm

windows

  • winget install OpenJS.NodeJS.LTS

Then use cd <directory> to navigate to ur bot folder.

From there it depends on what code language u used to make your bot.

So for python u do python <main_file_name> (for example bot.py or main.py)

For javascript u would use node index

#

so this for nothing

#

dayum what a time i wastedโ€ฆ

#

-# on mobile๐Ÿ˜ญ

narrow glen
#

Hi everyone!!

I was wondering if anyone could help me with something. I'd like to know if there is a way for me to create/add bots to top.gg via the rest api? I couldn't find anything online to this topic and the nearest thing I could find is the Post Stats but for that I need the topgg-token which only works after the bot is added.
So my question is: is there any api method to add a new bot to top.gg or is it only possible through their website?

Thanks in advance!

steep vigil
#

Uhh it's done via you logged in on the website, if it was API based that would be abused so much

narrow glen
steep vigil
#

That's the one and only way. You cannot submit bots via an API

boreal flower
#

Whatโ€™s wrong with waiting for it to be added for posting stats though? If thatโ€™s your overall goal anyway?

grim roost
#

Good afternoon, A question for the verification of my bot. I need to register the cmds on the web, since I cannot find the token to register the cmds and I apologize for the inconvenience.

mint vault
#

Your bot needs to be approved and on the website to have an API token

#

The list of commands on your bot's page are not needed to be approved

grim roost
#

Perfect, thank you very much for the information update.

deep sigil
#

Will there ever be a Discord server-specific callback configuration again or do we need to access votes using a different API from here on out

inner island
#

One message removed from a suspended account.

runic creek
#

Check the "Webhooks" tab after clicking the button responsible for editing the bot

inner bobcat
#

hi guys . i am using top.gg for /vote . but now each user have to use the command again after the vote to claim the reward. is possible to make it automated? when user vote to instantly auto give him the reward?

ebon grotto
#

i have one question

#

so im putting webhook on website

#

and is not working

steep vigil
steep vigil
#

To actually get the webhook link you need to use ngrok, I can send how in a min

steep vigil
# inner bobcat ok yes please

So when you know what port the topgg thing is working on, you can install ngrok (see https://ngrok.com/downloads/linux for more info) and then when it's installed make a ngrok account before making a new terminal instance (can be done via tmux, or in vsc the terminal button, or in windows with the plus icon) and type ngrok config add-authtoken <token> which is the token you generated with your ngrok account, then just do ngrok http <port> which is the top.gg port thing, then copy the link shown, paste that into the topgg bot settings thing and hit test webhook to see if it works

#

Sorry for the lack of punctuation, hope that makes sense :3

inner bobcat
#

not just a webhook?

steep vigil
#

yeah

#

that is the webhook

mild ingot
#

anyone got a bot where if someone votes it gives them a role in discord

steep vigil
#

You need to use vote webhooks and events to trigger the role update

limpid magnet
#

@woven coral you're working on top.gg SDKs right? Do you need any help with anything? I haven't been keeping up with the API updates but I've heard that there's something new either coming or already here?

haughty mulch
#

by the way this part of the API is outdated, the authorization header should be Bearer <token> and just the token. Spent a LOT of time figuring this out unforuntately ๐Ÿ˜ญ

(im sure this was reported before, please update it)

mint vault
#

The underlined headers everywhere can be fixed at the same time

woven coral
woven coral
# limpid magnet <@661200758510977084> you're working on top.gg SDKs right? Do you need any help ...

For the API:
Veld has announced two new v1 endpoints: https://github.com/top-gg/docs/pull/99, he has also announced the resurface of the widgets endpoints not too long ago.
To use v1 endpoints, it's required for you to use a newer token. Legacy tokens are not supported. And this time, a Bearer token prefix is required.

For the SDKs:
I'm working on making pull requests for all of the SDKs. Some SDKs have been ported to v1 because they're prioritized (Node.js, Python, C++, Rust) while others are still yet to be ported but have been ported to the latest version of v0 (Lua, Java, Ruby, Go, C#, PHP)

My changes are pretty big so I had to split my pull requests (including the one for the docs endpoint) into several batches. I am currently working on that right now.

#

So expect them to be a bit delayed. Sorry everyone.

ember jungle
#

how do i get webhook..

runic creek
#

You make it

#

Webhook is nothing more than a web server to receive requests from top.gg

woven coral
#

@vital anvil hey, so is the ratelimit for /v1/projects/ the same rate as /bot/?

vital anvil
#

yes

woven coral
#

noted

strong dome
#

Alrighty. Idk where to go for this question, but i wanted to know how id do this?

mint vault
teal mesa
#

-botinfo 851760449539407882

abstract mothBOT
#

A powerful and solid bot with the main motive to spice up your server!

ID

851760449539407882

Username

Jr. Kelly

Prefix

/

Server Count

17,000 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

adultonly, images

Owners

@teal mesa

steep vigil
teal mesa
cobalt saffron
#

I donโ€˜t receive webhook-events. Iโ€˜m using express, everything is configured correctly, but it isnโ€˜t working

#

How do I fix it?

elfin marlin
cobalt saffron
elfin marlin
#

I believe http is fine if you use the ip and port

#

ive done it before using that

runic creek
#

@untold sparrow can you check deleted messages? (support scam)

elfin marlin
#

and how do you add the url, do you have a domain, reverse proxy?

cobalt saffron
elfin marlin
#

have you tried curl'ing that url yourself to see if the webserver is online and accessible?

cobalt saffron
#

so it is online

elfin marlin
#

that doesnt neccessarily mean it can though

#

actually check

#

Add logs into your express server as well

cobalt saffron
#

iโ€˜ll later when iโ€˜m at home

#

thx

elfin marlin
#

also if you're using replit its a really shit bot host

cobalt saffron
#

Fixxed it

brazen cobalt
#

are you allowed to just send in 0 servers to the API if you donโ€™t want your bot to show how many servers?

runic creek
#

Theoretically yes (I've seen servers with 0 or 1 server count) but it's better not to send anything then at least in the search there won't be this icon responsible for the server count and on the bot's website it will show 0 anyway

#

But you do you, generally speaking you shouldn't lie about the number of servers but this probably refers to purposely inflating the number of servers

brazen cobalt
#

or would that be considered lying about it

runic creek
#

There shouldn't be a problem with that I guess

astral marlin
#

-botinfo 1419275175647776770

#

Bro you

#

can do this.

radiant pasture
modern trail
#

im using py

elfin marlin
steep vigil
#

The current python topggpy library sucks, I use a fork of it which is better

proven quest
runic creek
#

You can submit the number of servers and commands list on your bot's page or fetch information about bots submitted on top.gg

runic creek
proven quest
runic creek
#

All endpoints are explained in the documentation

proven quest
dusk linden
#

Just read the docs buddy ๐Ÿ˜”

#

If you have any specific doubts then you may ask

onyx shore
mint vault
#

That's the whole point of webhooks

#

To reward/thank a user right after they vote

#

Not once they use a command

#
  • not sure why you felt the need to reply to a message that was sent over a week ago...
brazen cobalt
#

im getting the error:

AxiosError: Request failed with status code 500

when posting server count to top.gg. this used to work, i haven't changed any code:

const result = await axios.post(
    `https://top.gg/api/bots/${clientId}/stats`,
    { server_count: client.guilds.cache.size },
    { headers: { Authorization: postToken, "Content-Type": "application/json" } }
);
lapis igloo
#

Derek, I'll send you the logs directly. I checked everything on my side and the only thing is that it sends me back to the top-gg/sdk API problem.

elfin marlin
lapis igloo
#

@untold sparrow

#

๐Ÿ˜…

untold sparrow
#

escaleted the issue

lapis igloo
#

Can I send you private?

elfin marlin
#

Why?

vital anvil
#

Hey apologies let me take a look. I did some refactoring on an internal service and didnโ€™t catch this

tender steppe
#

Why is this error coming?

runic creek
#

Read 1 message above yours

vital anvil
#

I think this may have to do with the stricter validation I pushed to the API

tender steppe
#

998547879201349693

vital anvil
#

hmm okay thanks for sharing

vital anvil
#

@tender steppe @elfin marlin @lapis igloo @brazen cobalt A fix is deploying now

#

Thanks for reporting the issue!

lapis igloo
brazen cobalt
mellow wasp
#

Hi I need support

runic creek
#

Just ask your question(s) or describe your problem I guess

mellow wasp
#

it seem doesn't work to me

mint vault
#

on your bot's settings page on top.gg you get a token

lament hornet
lament hornet
#

fixed it

#

for who have the same error, just let the array in post body without other property

await apiV1.post("/projects/@me/commands", commandsArray);
near mortar
mild ingot
wary gazelle
lament hornet
# wary gazelle can you share how `commandsArray` looks like? cz for me, when I try to pass `App...

 const commandsArray = clientCommands
        .filter((command) => !command?.isDev)
        .map((command) => ({
          options: command.data?.options ?? [],
          name: command.data?.name ?? "sem-nome",
          name_localizations: command.data?.name_localizations ?? null,
          description: command.data?.description ?? "Sem descriรงรฃo",
          description_localizations:
            command.data?.description_localizations ?? null,
          contexts: command.data?.contexts ?? [],
          default_permission: command.data?.default_permission ?? null,
          default_member_permissions:
            command.data?.default_member_permissions ?? null,
          dm_permission: command.data?.dm_permission ?? true,
          integration_types: command.data?.integration_types ?? [],
          nsfw: command.data?.nsfw ?? false,
        }));
elfin marlin
#

.get .post .patch etc

jagged pine
#

are vote responses on v1 api cached? 'cause I voted but keep getting 404, correct user id and token

vital anvil
#

show your fetch call?

jagged pine
#
suspend fun hasUserVotedLast12Hours(
    userId: String,
): Boolean {
    try {
        val uri = UriComponentsBuilder.fromUri(URI("https://top.gg/api/v1"))
            .pathSegment("projects", "@me", "votes", userId)
            .build()
            .toUriString()

        val body: TopggVoteResponse = httpClient.get(uri).body()

        log.info { body }

        return body.createdAt.isAfter(Instant.now().minusSeconds(43201))
    } catch (e: ClientRequestException) {
        if (e.response.status.value == 404)
            return false
        else
            log.error("Failed fetching last vote from top.gg", e)
            return true
    } catch (t: Throwable) {
        log.error("Failed fetching last vote from top.gg", t)
        return true
    }
REQUEST: https://top.gg/api/v1/projects/@me/votes/256851887502917633
METHOD: HttpMethod(value=GET)
COMMON HEADERS
-> Accept: application/json; application/json
-> Accept-Charset: UTF-8
-> Authorization: Bearer mytokenshh
-> Content-Type: application/json
CONTENT HEADERS
-> Content-Length: 0
2025-10-07T01:55:32.776+02:00  INFO 30176 --- [atcher-worker-3] io.ktor.client.HttpClient                : RESPONSE: 404 Not Found
METHOD: HttpMethod(value=GET)
FROM: https://top.gg/api/v1/projects/@me/votes/256851887502917633
COMMON HEADERS
-> CF-RAY: 98a917192a6fcfef-MAD
-> Connection: keep-alive
-> Content-Length: 176
-> Content-Type: application/problem+json; charset=utf-8
-> Date: Mon, 06 Oct 2025 23:55:32 GMT
-> Server: cloudflare
-> Strict-Transport-Security: max-age=15552000; includeSubDomains; preload
-> X-Content-Type-Options: nosniff
-> alt-svc: h3=":443"; ma=86400
-> cf-cache-status: DYNAMIC
-> via: 1.1 google
-> x-cloud-trace-context: 20de9faf6ebebd717c75b67c317192eb;o=1
vital anvil
#

@jagged pine is that the discord User ID?

#

you need to append ?source=discord if you want to check a discord User ID

jagged pine
pine fulcrum
#

Not even joking, I opened ur profile and Iโ€™ve been trying to sleep, I got bombed by the brightness

lavish wraith
#

where do I find the docs

runic creek
lavish wraith
cobalt shadow
#

brooooooooooooooooooo i cant get webhook

#

on correct id also

jaunty plank
#

what do you mean?

cobalt shadow
#

see

cobalt shadow
#

this

jaunty plank
tawdry crypt
#

If I'm just testing things, can I upload a "blank" bot to Top.gg, or is that not allowed?

#

I'm a small bot dev, trying to work on a feature for another bot

runic creek
#

Your bot still needs to be approved so you can't actually submit a "blank" bot on top.gg

#

I mean you can but it will be declined anyways

tawdry crypt
#

I see, is there a way to set up a test environment?

small temple
#

i hate to do this as i know the question is asked quite often, but i'm running into issues updating my bot's server count on the site. i've gotten to the point of sending what seems to be a valid request (i.e. api gives me a 200 back), but the count on the bot's page still doesn't reflect it. i've both reloaded the page and clicked the "refresh data" button and neither seem to do the trick. the requests seem to have just reset the count to 0 from whatever it was when it was registered

small temple
#

i also tried new rw key and legacy key

#

i've also tried a few different data shapes, tried doing an int in server count with all the proper shard data, tried changing server count to an array to behave like shards, tried doing it with no shard data, no dice

#

but 200s from all requests

jaunty plank
#

I'm not sure if the go lang library has been tested in a long time.

Curl example though(Just tested and works)

curl -X POST \
  https://top.gg/api/bots/BOT_ID_HERE/stats \
  -H "Authorization: YOUR_TOP.GG_LEGACY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"server_count": SERVER_COUNT_HERE}'

BOT id, legacy token and server count need to be set.

#

The api is in a really weird state right now(imo)

small temple
#

okay so doing legacy token + just the server count seems to have done the trick. does the shard stuff just not work?

jaunty plank
#

It was deprecated

#

we dont use shard counts anymore, docs havent been updated to reflect it

small temple
#

i've been spinning my wheels on this for far too long

jaunty plank
#

lmao

#

sorry ๐Ÿ™

small temple
#

alg

#

the api probably shouldn't say 200 either Think

jaunty plank
#

It practically always responds with 200

#

v0 is super broken

small temple
#

the api of ragebait and trolling

jaunty plank
#

I want to pin that so bad

tawdry crypt
signal granite
remote ivy
#

Hey guys!
Is there a webhook page for servers?

runic creek
#

Not yet, apparently this is planned but for now there is only an API route to check if someone has voted

stuck kite
#

Is there a method to collect users who have voted within the last 12 (or better, 24) hours by chance?

#

Aside from locally caching ofc

stuck kite
#

Where would one find "v1" for webhooks??

jaunty plank
#

We've never been told about a v1 for webhooks at least ^-^

stuck kite
jaunty plank
#

Starting at v1. It's on v0

#

Ie when v1 is released it will include those.

daring cairn
#

my webhook sometimes ignore some votes

#

why

void estuary
daring cairn
void estuary
daring cairn
#

cuz yk sharing webhook url public is kind a dangerous

void estuary
#

for example, my webhook url is something like

integrations.wabbit.gg/vote

and i have an express route, voteRoutes.js listening on my server for /vote events

#

do you have something like that set up?

daring cairn
#

eh no..

#

and I still dont know what code do you guys mean when you say share your code

runic creek
#

What do you use to get information about whether someone has voted?

void estuary
# daring cairn and I still dont know what code do you guys mean when you say share your code

look, this is example code that i use to listen to top.gg webhook events

const globalProfileModel = require("../models/globalProfileModel");
const createVoteReminder = require("../functions/createVoteReminderDocument");

const validateTopGG = (req, res, next) => {
  const authHeader = req.headers.authorization;
  
  if (!authHeader) {
    return res.status(400).json({
      success: false,
      message: "Invalid webhook key"
    });
  }
  
  if (authHeader !== process.env.TOP_GG_WEBHOOK_KEY) {
    return res.status(403).json({
      success: false,
      message: "Invalid webhook key"
    });
  }
  
  next();
};

const handleUserVote = async (req, res) => {
  try {
    const { user } = req.body;

    const userProfile = await globalProfileModel.findOneAndUpdate({
        userId: user,
    }, {
        $inc: {
            totalVotes: 1,
            availableVoteCredits: 1,
        },
        $set: {
            lastVoted: new Date(),
        }
    }, { new: true, upsert: true });

    if (userProfile && userProfile.voteReminders) await createVoteReminder(user);

    return res.status(200).json({
      success: true,
      message: "Vote received"
    });

  } catch {
    return res.status(500).json({
      success: false,
      message: "Unknown error",
      details: error.message
    });
  }
};

module.exports = [validateTopGG, handleUserVote];
#

server.js

const userVote = require("../routes/userVote");
app.post("/vote", userVote);
#

you need something like a simple express server

daring cairn
#

le ne explain what i did

i searched for top gg webhooks and it gave me this Web https://webhook-topgg.com/new/url than i clicked on start than i shared my webhook url from my server and it asked me what kind of message do you want like only the Datum and name or how many votes i choesd the long one than it gave me a url and it said go to your bot edit section and click on interaction api and in the webhook url I added the webhook that this web gaved me https://webhook-topgg.com/new/url
and than I also added the authorization code also same as the website gaved me i clicked on send test and it sended the test message but when someone else is voting it doesn't send the message but when I vote it sends the message

Simplifying top.gg webhooks for all users, allowing non-developers and developers to use webhooks for their bot and server without confusing configuration.

void estuary
#

oh a 3rd party service, i'm not familar with that
but i can take a look lol

runic creek
#

Then you should contact them because this is not official tool made by top.gg

#

There should be link to their support server on the website

daring cairn
#

oh.. i thought its from top.gg cuz the url topgg is in it..

void estuary
runic creek
#

Literally in the right-down corner

void estuary
#

well to be fair english not his first language

#

speaks more languages than me

daring cairn
#

nah I only speak English Germany and Kurdish

void estuary
#

wow 3 xd

#

i'm dumb stupid american cynder

daring cairn
daring cairn
runic creek
daring cairn
#

Webserver?

runic creek
#

Yes

daring cairn
#

ye no idea what that is....

#

ama ask replit ai he definitely can help

daring cairn
#

he asking for topgg webhook password?

daring cairn
#

all your votes details *

modern glacier
#

Why I am getting this error from like 1-2 days

In my bot I added vote only system so people needs to vote but rn beacause of this error people cant got that msg so they also can't acces the vote only Commands ?

Note: from starting it's working fine I got this error like yesterday maybe

#

Now again so I am here

runic creek
#

What api route are you using?

vital anvil
#

why tf does the docs mention webhooks v1 when its not even being worked on yet

#

that's dumb as bricks

#

im removing it

#

i cant even find which commit that came from

ruby geode
#

I have my bot verified and everything is alright but how can i track votes for a specific server (my server)

raven plume
#

Is there documentation for how to get the reviews of the bot

runic creek
vestal wasp
#

@warped gate @dusk yacht

const express = require('express');
const app = express();

app.use(express.json());

app.post('/webhooks/topgg', (req, res) => {
  console.log(request.body);
});

app.listen(3000, () => {
  console.log(`Example app listening on port ${port}`);
});

#

request.body.user to get the user id

modern glacier
#

Still facing

vestal wasp
#

iirc

modern glacier
#

So how can I fix this ?

mint vault
#

Handle 404 properly

modern glacier
vestal wasp
#

if (res.status === 404) return false

#

or idk how your code looks like

modern glacier
#

I can fix that

#

Just I am not understanding the issue before

#

Now I got that thanks

#

I will fix that easily

indigo wagon
#

๐Ÿ‘€

#

Hello

placid locust
#

hey

fresh canyon
#

hey hey, i have a question to the guidelines and the API

when I program a web scraping services to check the reviews (to reward users for it)
is this against your guidelines?

runic creek
#

Yes, you can't reward users for reviews afaik

#

And you shouldn't scrape the website either

fresh canyon
fresh canyon
radiant pasture
#

can't and must not are the same thing

#

you'd be breaking the guidelines if you rewarded users

fresh canyon
#

okey thanks
i will code my projekt whit another feature xd

i will not break the guidelines

boreal flower
#

You can reward them for voting though

dusk forge
boreal flower
dusk forge
#

Oh lol

boreal flower
stuck kite
#

What exactly does clicking the "Refresh data" button do? Thonk

runic creek
#

In case of bots, it fetches the bot name and avatar from the Discord API

#

In the case of servers it does the same + probably updates the number of members

hard cave
#

hello I wanted to ask, how can we update the number of servers my bot is in?

stuck kite
steep vigil
#

They do moderate it, but not automatically

stuck kite
#

fair enough

restive otter
#

Where can I locate the token

signal granite
restive otter
#

found it

#

thsnk

balmy atlas
#

Hello where can I locate the token?

runic creek
#

Read messages above

gentle bough
#

hey can someone help me set up a vote-tracking system for server? dm me or reply if you can help, thanks

radiant pasture
#

if you need help setting up the bot, you can join their support server

gentle bough
radiant pasture
#

is your bot approved on the site?

gentle bough
radiant pasture
#

is the server approved on the site

gentle bough
#

Yeah

radiant pasture
#

click edit, then integrations and api on the left sidebar

gentle bough
#

Ok let me try

gentle bough
#

I can't see anything except that token one

radiant pasture
gentle bough
radiant pasture
#

ask their support server for help, not here

gentle bough
#

:pareshan:

#

Do you have any idea about where can I add webhooks?

#

@radiant pasture ^ sorry for the ping

gentle bough
#

Or i can't track the server votes anymore?

runic creek
#

Technically you can, but not via webhooks but via API

#

Probably impractical with more users, but possible

gentle bough
lost berry
#

404\

lost berry
brazen oxide
#
    at Api._request (/home/container/node_modules/@top-gg/sdk/dist/structs/Api.js:61:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async InteractionCreate.run (/home/container/dist/events/client/InteractionCreate.js:830:23) {
  response: {
    statusCode: 404,
    headers: {
      date: 'Sun, 02 Nov 2025 12:16:41 GMT',
      'content-type': 'application/json',
      'content-length': '29',
      connection: 'keep-alive',
      'cf-ray': '998390802a648ed3-FRA',
      vary: 'RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch',
      'x-cloud-trace-context': 'e93118ea57e9c412ea343e2332510259',
      via: '1.1 google',
      'alt-svc': 'h3=":443"; ma=86400',
      'cf-cache-status': 'DYNAMIC',
      'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
      'x-content-type-options': 'nosniff',
      server: 'cloudflare'
    },
    trailers: {},
    opaque: null,
    body: BodyReadable {
      _events: [Object],
      _readableState: [ReadableState],
      _read: [Function: bound resume],
      _maxListeners: undefined,
      _eventsCount: 3,
      Symbol(shapeMode): true,
      Symbol(kCapture): false,
      Symbol(abort): [Function: abort],
      Symbol(kConsume): [Object],
      Symbol(kBody): null,
      Symbol(kContentType): 'application/json',
      Symbol(kReading): false
    },
    context: undefined
  }
}
#

anyone can help

runic creek
#

What route are you using?

brazen oxide
#
    try {
        // DODAJ SPRAWDZENIE CZY topGG JEST DOSTฤ˜PNE
        if (!this.client.topGG || typeof this.client.topGG.hasVoted !== 'function') {
            console.log('โš ๏ธ TopGG nie jest dostฤ™pne, pomijam sprawdzanie gล‚osรณw');
            // Kontynuuj wykonywanie komendy bez blokowania
        } else {
            const voted = await this.client.topGG.hasVoted(interaction.user.id);
            if (!voted) {
                const voteBtn = new ActionRowBuilder<ButtonBuilder>().addComponents(
                    new ButtonBuilder()
                        .setLabel(T(locale, "event.interaction.vote_button"))
                        .setURL(`https://top.gg/bot/${this.client.user?.id}/vote`)
                        .setStyle(ButtonStyle.Link),
                );

                return await interaction.reply({
                    content: T(locale, "event.interaction.vote_message"),
                    components: [voteBtn],
                    flags: MessageFlags.Ephemeral,
                });
            }
        }
    } catch (error) {
        // ลAP I LOGUJ Bลฤ˜DY TOP.GG BEZ RZUCANIA ICH DALEJ
        console.log('โŒ Bล‚ฤ…d Top.gg przy sprawdzaniu gล‚osรณw:', error.message);
        // KONTYNUUJ WYKONYWANIE KOMENDY POMIMO Bลฤ˜DU
    }
}```
#
    try {
        const autoPoster = AutoPoster(env.TOPGG, this.client);

        autoPoster.on("posted", () => {
            this.client.logger.info("โœ… Successfully posted stats to Top.gg!");
        });

        autoPoster.on("error", (error) => {
            this.client.logger.warn(`โš ๏ธ Top.gg autoposter error: ${error.message}`);
            // Nie rzucaj bล‚ฤ™du dalej - tylko loguj
        });

        this.client.logger.info("Top.gg autoposter initialized.");
    } catch (error) {
        this.client.logger.warn(`โŒ Failed to initialize Top.gg autoposter: ${error.message}`);
    }
} else {
    this.client.logger.warn("Top.gg token not found or empty. Skipping auto poster.");
}```
runic creek
#

So you check if the user has voted for your bot. If the user has not voted for your bot even once, then top.gg api will return 404. You have to handle that

brazen oxide
#

So it's not the code's fault, but the fact that it didn't vote?

runic creek
#

Yea

brazen oxide
dense mulch
versed schooner
#

hi

restive otter
#

Helpp

#

hellpp

steep vigil
#

You need a token for it

#

As it says

restive otter
steep vigil
#

Go you you're bots page -> edit -> integrations and make one

restive otter
#

Ok

steep vigil
#

Then add it in the correct headers

restive otter
#

๐Ÿ˜

steep vigil
#

Uhhhhh give me a sec I haven't used the new layout in a while

steep vigil
rugged epoch
restive otter
#

Bru

steep vigil
#

This is what it should look like

#

Is it a server or bot?

restive otter
#

Its Just Desc

steep vigil
#

Your bot needs to be approved before you can use the API

restive otter
#

I dm fellintron

#

But he offline

mint vault
#

Surprisingly time zones exist and they do it on a voluntarily basis hence have a life outside of it

thorny otter
#

Hey, does anyone know why the v0 bots endpoints don't work as documented since a few days? eg.:

  • GET https://top.gg/api/bots/:botId/stats actually behaves like https://top.gg/api/bots/stats (which isn't documented btw) and returns your own bot stats, no matter what botId is in the URL
  • GET https://top.gg/api/bots/:botId returns a 404, no matter what botId is in the URL
uncut trellis
#

Anyone have an answer for this? ^

eager crypt
#

The docs on .NET (https://docs.top.gg/docs/Libraries/dotnet) mention a library called DiscordBotsList.Api.

This, however, does not seem to be available:

PS [...]> Install-Package DiscordBotsList.Api      
Install-Package : No match was found for the specified search criteria and package name 'DiscordBotsList.Api'. Try Get-PackageSource to see all 
available registered package sources.
At line:1 char:1
+ Install-Package DiscordBotsList.Api
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

nuget search (https://www.nuget.org/packages?q=discordbotlist) for "discordbotlist" also only gives DiscordBotList.Core, which only really seems to include models on bot/user/shard/etc. but with no API.

dusk linden
#

hi, im checking my code after a long time and https://top.gg/api/bots/<botid> seems to no longer work. When i check the docs, it is actually on the v0 API as a route to use, but i get the error 404 richened web.

https://top.gg/api/bots/<botid>/stats also works. Am i doing something wrong? Did something change while i was busy doing nothing?

dusk linden
#

it is documented tho stats as a POST on the website @thorny otter

thorny otter
#

Yeah but Iโ€™m talking about the GET endpoint. POST seems to still work as expected afaik

#

The GET endpoint worked fine until about a week ago

dusk linden
#

Oh ok mb yeah didnt at all read that much

#

Just seen similar problem and replied

violet mountain
#

Returns

mint vault
#

I'd guess it returns a 404 like quite some of the messages above mention

desert bolt
#

Dunno if im blind, but is there a way to obtain reviews to display on my site from my bot on top.gg

#

iof so, what endpoint is it?