Oauth

Refreshing the tokens

Changed on

The access_token has a lifetime. After a period of time, which was returned to you in expires_in JSON property, the access_token will be invalid, and you can no longer use it to get data from our API. To refresh the access_token, you must use the refresh_token.

post/oauth/token/

Request

  • Base URL
    https://oauth.pipedrive.com
  • Auth
    HTTP basic

Headers

Authorizationstring required

Base 64 encoded string containing the client_id and client_secret values. The header value should be Basic <base64(client_id:client_secret)>.

Request body application/x-www-form-urlencoded

grant_type'authorization_code' | 'refresh_token'

Since you are to refresh your access_token, you must use the value "refresh_token"

refresh_tokenstring

The refresh token that you received after you exchanged the authorization code

Response

Returns user Oauth2 tokens.

access_tokenstring

You need to use an access_token for accessing the user's data via API. You will need to refresh the access token if the access_token becomes invalid.

token_typestring

The format of the token. Always "Bearer".

refresh_tokenstring

A refresh token is needed when you refresh the access token. refresh_token will expire if it isn't used in 60 days. Each time refresh_token is used, its expiry date is reset back to 60 days.

scopestring

List of scopes to which users have agreed to grant access within this access_token

expires_ininteger

The maximum time in seconds until the access_token expires

api_domainstring

The base URL path, including the company_domain, where the requests can be sent to

Changes