Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rikvik2006 opened this issue Dec 27, 2023 · 2 comments

Comments

@rikvik2006
Copy link

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
Copy link
Owner

yafyz commented Dec 31, 2023

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

@rikvik2006
Copy link
Author

rikvik2006 commented Dec 31, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants