Keycloak roles Req

Hi team,

I Am trying to integrate keyclaok with Swagger API, for that I created realm and client with required scope which was mentioned in API application. then created user and realm roles that roles attached to user. like roles is Library.Read those roles configured in swager API application and while accessing that APIs got an error as message": "Requires role: Library.Read" checked that access token on website found that token claim has those roles.

how to resolve it ?