As I know it is about the PKCE code .when you get this error especially in API Resource . Every Api and client that use Identity server 4 for generate token or validate token must Use pkce . in API swagger you must addpkce in configuration.