© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
2 replies
heyimenes

✅ Route Doesn't Trigger When Called Externally

Hi, I need some help with this issue. I've tried everything but still can't find the solution.
Here's my code:

[HttpGet]
[Route("auth/discord/callback")]
public async Task<IActionResult> Callback([FromQuery] string code)
{
  Return Ok();
}
[HttpGet]
[Route("auth/discord/callback")]
public async Task<IActionResult> Callback([FromQuery] string code)
{
  Return Ok();
}


When I get a callback from Discord, it sends me the following URL:
http://localhost:7201/auth/discord/callback?code=REAL_CODE
http://localhost:7201/auth/discord/callback?code=REAL_CODE


However, the callback doesn't seem to detect it. But if I manually input a code like:
http://localhost:7201/auth/discord/callback?code=123123
http://localhost:7201/auth/discord/callback?code=123123

the callback detects it.
What could be the reason for this behavior?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Button doesn't trigger function for it
C#CC# / help
4y ago
Windows keyboard hook (SetWindowsHookExA) doesn't get called.
C#CC# / help
3y ago
SignalR:OnDisconnectAsync() doesn't get called when Project is hosted but works locally
C#CC# / help
11mo ago
✅ when i'm grounded my running animation won't trigger
C#CC# / help
3y ago