Logout API not working for confidentail token in keycloak

when i am generating token for a user using confidentail token, my logout API via. refresh token is failing stating Bearer token and refresh token are not matching although same contents and clientID is passed in both, need a fix for this.