Obtaining an Access Token Using a Refresh Token

From Connect
Jump to: navigation, search

Go Up to Obtaining Authorization to Use the API

You can use a refresh token to obtain a new access token without having users go again through the authorization flow.

To obtain a new access token using a refresh token, you must perform a request against http://connect.example.com/api/oauth/token providing your refresh token. In your request, you must append the following query parameters to this URL:

Item Example Description



Your refresh token.



The ID of your client application, as registered in the target Embarcadero Connect installation.



The secret of your client application, as registered in the target Embarcadero Connect installation.



The type of your access token request.

Provide the value refresh_token here, as your request to Embarcadero Connect is for an access token in exchange for a refresh token.

The following is an example URL:


Embarcadero Connect responds in JSON format. The server response includes the following information:

    // Token to include in every API request to get access.
    "access_token": "d4ac0c07-0013-4939-b9ee-0112fdbb7d64",
    // Type of token. This is always "bearer".
    "token_type": "bearer",
    // Token that you can use to get a brand-new access token without further user interaction.
    "refresh_token": "bcd5a78c-9f0a-4ba6-9baa-5872e5acf7bb",
    // Number of seconds before the access token expires. Default value is 86400 (7 days).
    "expires_in": 86399,
    // Granted scope.
    "scope": "read write"

You can now continue using the Embarcadero Connect API, including the provided access token in every API request.

See Also