<@U04UQ68083H> Does ory oauth2 support refresh tok...
# ory-copilot
w
@chilly-king-10285 Does ory oauth2 support refresh token for client credential grant type?
b
A message from kapa.ai
No, Ory OAuth2 does not support issuing refresh tokens for the client credentials grant type. According to the documentation, refresh tokens are only issued for the authorization code and hybrid flows, and not for the client credentials grant. This is also confirmed in the troubleshooting section, which states that using the client_credentials grant cannot return a refresh token. If you expect a refresh token but are using the client credentials grant, you will not receive one [Docs: OAuth2 refresh token grant](https://www.ory.sh/docs/oauth2-oidc/refresh-token-grant) [Docs: Hydra Debug](https://www.ory.sh/docs/hydra/debug).
w
@chilly-king-10285 so is there a recommended approach to refresh tokens for client credential grant type?
b
A message from kapa.ai
Ory OAuth2 does not support refresh tokens for the client credentials grant type, and the knowledge sources do not mention any recommended approach to "refresh" tokens for this grant. The typical pattern is to simply request a new access token using the client credentials grant whenever the previous one expires. This is standard practice, as the client credentials grant is intended for machine-to-machine authentication where the client can securely store its credentials and request new tokens as needed [Docs: Hydra Debug](https://www.ory.sh/docs/hydra/debug). If you need longer-lived tokens, you can configure the access token's lifespan for the client credentials grant, but refresh tokens are not part of this flow [Configure token expiration time](https://www.ory.sh/docs/hydra/guides/client-token-expiration).