"Invalid authorization code" error can be generated by:
- A corrupted code (e.g. adding extra space before or after the code, missing characters...)
- Using the code after 5 minutes - codes only last for 5 minutes.
- Reusing the same code twice (it is only valid once).
If you need more information
Check out this documentation with more details about the issue.