Open ronbr2151 opened 3 years ago
Maybe because you put your token as my top.gg bots token here
?
Maybe because you put your token as
my top.gg bots token here
?
no i did not
Where is the error coming from? What api call?
Can't help with library related errors. Try doing a raw http request and if it still fails with the correct headers and url then I can take a look
Broken tooth and I work sortoff together (I work on the website) and I have a simple API get request and it says unauthorized.
const fetch = require("node-fetch")
console.log(tokens.topggAuthorization)
const schhool = await fetch('https://top.gg/api/bots/828349677950074881/', {
method: 'GET', headers: {
"Authorization": tokens.topggAuthorization,
"Content-Type": "application/json" //I also tried without the content type
}
});
var topgg = await schhool
console.log(topgg)
With the response as:
Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: PassThrough {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
[Symbol(kCapture)]: false,
[Symbol(kTransformState)]: [Object]
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'https://top.gg/api/bots/828349677950074881',
status: 401,
statusText: 'Unauthorized',
headers: Headers { [Symbol(map)]: [Object: null prototype] },
counter: 1
}
}
And yes we using the same topgg authorization token
Anyone knows the problem?
Expected Behavior
I expected for my bot to post his stats
Observed Behavior
it shows an error
Applicable Links or Attachments
Steps to Reproduce
the code:
Web Browser and Version
google is my web browser idk the version
Operating System and Version
Windows, idk the verstion
Screen Resolution
idk and i dont think its important in that case
Additional Information/Comments
it says i dont have a token but i do, and a mod told me to submit an issue here.