Skip to main content
Version: 8.1

Change the OAuth token lifetime

Level: intermediate

Creatio lets you authorize via OAuth 2.0 using the client credentials flow. Third-party apps and web services you integrate with Creatio receive OAuth token using client credentials for authentication. An OAuth token is an auto-generated token that lets you access Creatio API.

Each OAuth token has a finite lifetime, 3600 seconds out of the box. The [AccessTokenLifetime] column in the [Clients] database table stores the value of the token lifetime.

Important

To avoid integration issues and minimize security risks, we recommend using OAuth token lifetime no longer than a few hours.

To change the token lifetime for Creatio in the cloud, contact Creatio support.

To change the token lifetime for Creatio on-site:

  1. Retrieve the value of the token lifetime. To do this, execute the following SQL query.

    SQL query
    select
    "ClientId",
    "AccessTokenLifetime"
    from "Clients"
  2. Set a new lifetime of the token. To do this, execute the following SQL query.

    SQL query
    update "Clients"
    set "AccessTokenLifetime" = New_Token_Lifetime
    where "ClientId" = Some_Client_Id

As a result, the OAuth token lifetime for Creatio on-site will be changed.


See also

OAuth 2.0 setup procedure (user documentation)

Authorize external requests using OAuth 2.0


Resources

Creatio API documentation