Question

OAuth 2.0 refresh Token

I am able to get OAuth 2.0 in Webservice working, but I get this message: 

The response from the login includes a refresh token. How can we setup Creatio to refresh, as they time out.

{
    "access_token": "-M7ETi6Z7mO5lH0J2oOgXaHerJmI0flB63MtkpP90vw",
    "expires_in": 3600,
    "token_type": "Bearer",
    "refresh_token": "Z70gq5-qG5XeUzcEad6Z7BHjgZ_FyRSEWo-oKumafno",
    "scope": "api"
}

 

Like 1

Like

2 comments

Hello Keith,



It seems like you are attempting to make a call to an external endpoint from your web service, and not using Creatio's IdentityService. If that's the case, you will need to pass the `refresh_token` parameter to this third-party endpoint in the request body, where the request body type should be `x-www-form-urlencoded`. This will ensure that the token is automatically updated in case the old token has expired.

Thank you. I had the wrong Scope Type. Once I changed it all is working. 

Show all comments