Skip to content

Fixing 403 Forbidden Error#1

Merged
niker merged 1 commit intoniker:mainfrom
g4m3r0:main
Nov 16, 2025
Merged

Fixing 403 Forbidden Error#1
niker merged 1 commit intoniker:mainfrom
g4m3r0:main

Conversation

@g4m3r0
Copy link
Copy Markdown
Contributor

@g4m3r0 g4m3r0 commented Nov 16, 2025

This pull request updates the GenerateSecMsGecToken method in EdgeTts.cs to improve the calculation of the token timestamp and ensure the hexadecimal output is in the correct format. The changes enhance compatibility with the server's expectations.

Token generation improvements:

  • Changed the timestamp calculation to use DateTime.Now.ToFileTimeUtc() (1601 epoch) and updated the modulo logic for clarity and compatibility.

Hex formatting fix:

  • Modified ToHexString to use BitConverter and produce an uppercase hexadecimal string, matching the server's requirements.

Copy link
Copy Markdown

@densen2014 densen2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! I was fixed in same day

@niker niker merged commit d9ee852 into niker:main Nov 16, 2025
@niker
Copy link
Copy Markdown
Owner

niker commented Nov 16, 2025

Thanks for the contribution, I'll push it to NuGet once I have the chance to test it myself.

@niker
Copy link
Copy Markdown
Owner

niker commented Nov 16, 2025

Done, NuGet is uploaded and will be available once validated.

@g4m3r0
Copy link
Copy Markdown
Contributor Author

g4m3r0 commented Nov 16, 2025

Thanks for the fast push to nuget :)!

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

Successfully merging this pull request may close these issues.

3 participants