yafyz / nitrsnip

A discord nitro sniper, which tries to actually be good (50-30ms on AWS, basicaly the fastest one). With normal discord push notification working (unlike others)
42 stars 32 forks source link

Receiving 401 Unauthorized response when trying to redeem a used Nitro code #23

Closed rikvik2006 closed 11 months ago

rikvik2006 commented 11 months ago

I tested the application by sending Nitro links I had already used. However, I get attempts that have 401 Unauthorized as a response.

I don't know what response I should expect using redeemed Nitro codes, however, I tried to redeem the same code by making a POST request to the endpoint https://discord.com/api/v9/entitlements/gift-codes/SP4Jmhyq2pJs676f/redeem defining the authorization header with an account token and I was receiving 404 as response saying that the code was unknown, which makes more sense as a response than 401.

image

In conclusion, is it normal to receive 401 when trying to redeem an already redeemed Nitro code?

yafyz commented 11 months ago

seems to work fine, you sure you didn't just make a typo in d_token?

rikvik2006 commented 11 months ago

It was my fault for not defining d_token. I thought nitro was redeemed directly from tokens that found the nitro code. My brain just skipped the line where the authorization header was defined in gift.js