> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.hellosign.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.hellosign.com/_mcp/server.

# OAuth Token Refresh

POST https://app.hellosign.com/oauth/token?refresh
Content-Type: application/json

Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired.

Reference: https://developers.hellosign.com/docs/guides/o-auth/token-refresh

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Dropbox Sign API
  version: 1.0.0
paths:
  /oauth/token?refresh:
    post:
      operationId: tokenRefresh
      summary: OAuth Token Refresh
      description: >-
        Access tokens are only valid for a given period of time (typically one
        hour) for security reasons. Whenever acquiring an new access token its
        TTL is also given (see `expires_in`), along with a refresh token that
        can be used to acquire a new access token after the current one has
        expired.
      tags:
        - OAuth
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTokenResponse'
        '400':
          description: failed_operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthTokenRefreshRequest'
servers:
  - url: https://app.hellosign.com
    description: https://app.hellosign.com
components:
  schemas:
    OAuthTokenRefreshRequest:
      type: object
      properties:
        grant_type:
          type: string
          default: refresh_token
          description: When refreshing an existing token use `refresh_token`.
        refresh_token:
          type: string
          description: The token provided when you got the expired access token.
        client_id:
          type: string
          description: >-
            The client ID for your API app. Required for new API apps. To
            enhance security, we recommend making it required for existing apps
            in your app settings.
        client_secret:
          type: string
          description: >-
            The client secret for your API app. Required for new API apps. To
            enhance security, we recommend making it required for existing apps
            in your app settings.
      required:
        - grant_type
        - refresh_token
      title: OAuthTokenRefreshRequest
    OAuthTokenResponse:
      type: object
      properties:
        access_token:
          type: string
        token_type:
          type: string
        refresh_token:
          type: string
        expires_in:
          type: integer
          description: Number of seconds until the `access_token` expires. Uses epoch time.
        state:
          type:
            - string
            - 'null'
      title: OAuthTokenResponse
    ErrorResponseError:
      type: object
      properties:
        error_msg:
          type: string
          description: Message describing an error.
        error_path:
          type: string
          description: Path at which an error occurred.
        error_name:
          type: string
          description: >-
            Name of the error. See the `x-error-codes` catalog in openapi file
            for a complete list of possible error codes with detailed
            information including HTTP status codes, causes, remediation steps,
            and retry guidance.
      required:
        - error_msg
        - error_name
      description: Contains information about an error that occurred.
      title: ErrorResponseError
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorResponseError'
      required:
        - error
      title: ErrorResponse

```

## Examples

### Refresh an existing OAuth token



**Request**

```json
undefined
```

**Response**

```json
{
  "access_token": "MDZhYzBlMGI1YzQ0ZjI1ZjYzYmUyNmMzZWQ5ZGNmOGYyNmQxMmMyMmQ2NmNiY2M3NW=",
  "token_type": "Bearer",
  "refresh_token": "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
  "expires_in": 86400
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

$o_auth_token_refresh_request = (new Dropbox\Sign\Model\OAuthTokenRefreshRequest())
    ->setGrantType("refresh_token")
    ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3");

try {
    $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh(
        o_auth_token_refresh_request: $o_auth_token_refresh_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}";
}

```

```csharp C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class OauthTokenRefreshExample
{
    public static void Run()
    {
        var config = new Configuration();

        var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(
            grantType: "refresh_token",
            refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"
        );

        try
        {
            var response = new OAuthApi(config).OauthTokenRefresh(
                oAuthTokenRefreshRequest: oAuthTokenRefreshRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling OAuthApi#OauthTokenRefresh: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

```

```typescript TypeScript
import * as fs from 'fs';
import api from "@dropbox/sign"
import models from "@dropbox/sign"

const apiCaller = new api.OAuthApi();

const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = {
  grantType: "refresh_token",
  refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
};

apiCaller.oauthTokenRefresh(
  oAuthTokenRefreshRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling OAuthApi#oauthTokenRefresh:");
  console.log(error.body);
});

```

```java Java
package com.dropbox.sign_sandbox;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;

import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class OauthTokenRefreshExample
{
    public static void main(String[] args)
    {
        var config = Configuration.getDefaultApiClient();

        var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest();
        oAuthTokenRefreshRequest.grantType("refresh_token");
        oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3");

        try
        {
            var response = new OAuthApi(config).oauthTokenRefresh(
                oAuthTokenRefreshRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling OAuthApi#oauthTokenRefresh");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

```

```ruby Ruby
require "json"
require "dropbox-sign"

Dropbox::Sign.configure do |config|
end

o_auth_token_refresh_request = Dropbox::Sign::OAuthTokenRefreshRequest.new
o_auth_token_refresh_request.grant_type = "refresh_token"
o_auth_token_refresh_request.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"

begin
    response = Dropbox::Sign::OAuthApi.new.oauth_token_refresh(
        o_auth_token_refresh_request,
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling OAuthApi#oauth_token_refresh: #{e}"
end

```

```python Python
import json
from datetime import date, datetime
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, api, models

configuration = Configuration(
)

with ApiClient(configuration) as api_client:
    o_auth_token_refresh_request = models.OAuthTokenRefreshRequest(
        grant_type="refresh_token",
        refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
    )

    try:
        response = api.OAuthApi(api_client).oauth_token_refresh(
            o_auth_token_refresh_request=o_auth_token_refresh_request,
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling OAuthApi#oauth_token_refresh: %s\n" % e)

```

```go Refresh an existing OAuth token
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.hellosign.com/oauth/token?refresh="

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```swift Refresh an existing OAuth token
import Foundation

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.hellosign.com/oauth/token?refresh=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### OAuth Token Refresh Example



**Request**

```json
{
  "grant_type": "refresh_token",
  "refresh_token": "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"
}
```

**Response**

```json
{
  "access_token": "MDZhYzBlMGI1YzQ0ZjI1ZjYzYmUyNmMzZWQ5ZGNmOGYyNmQxMmMyMmQ2NmNiY2M3NW=",
  "token_type": "Bearer",
  "refresh_token": "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
  "expires_in": 86400
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

$o_auth_token_refresh_request = (new Dropbox\Sign\Model\OAuthTokenRefreshRequest())
    ->setGrantType("refresh_token")
    ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3");

try {
    $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh(
        o_auth_token_refresh_request: $o_auth_token_refresh_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}";
}

```

```csharp C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class OauthTokenRefreshExample
{
    public static void Run()
    {
        var config = new Configuration();

        var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(
            grantType: "refresh_token",
            refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"
        );

        try
        {
            var response = new OAuthApi(config).OauthTokenRefresh(
                oAuthTokenRefreshRequest: oAuthTokenRefreshRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling OAuthApi#OauthTokenRefresh: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

```

```typescript TypeScript
import * as fs from 'fs';
import api from "@dropbox/sign"
import models from "@dropbox/sign"

const apiCaller = new api.OAuthApi();

const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = {
  grantType: "refresh_token",
  refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
};

apiCaller.oauthTokenRefresh(
  oAuthTokenRefreshRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling OAuthApi#oauthTokenRefresh:");
  console.log(error.body);
});

```

```java Java
package com.dropbox.sign_sandbox;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;

import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class OauthTokenRefreshExample
{
    public static void main(String[] args)
    {
        var config = Configuration.getDefaultApiClient();

        var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest();
        oAuthTokenRefreshRequest.grantType("refresh_token");
        oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3");

        try
        {
            var response = new OAuthApi(config).oauthTokenRefresh(
                oAuthTokenRefreshRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling OAuthApi#oauthTokenRefresh");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

```

```ruby Ruby
require "json"
require "dropbox-sign"

Dropbox::Sign.configure do |config|
end

o_auth_token_refresh_request = Dropbox::Sign::OAuthTokenRefreshRequest.new
o_auth_token_refresh_request.grant_type = "refresh_token"
o_auth_token_refresh_request.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"

begin
    response = Dropbox::Sign::OAuthApi.new.oauth_token_refresh(
        o_auth_token_refresh_request,
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling OAuthApi#oauth_token_refresh: #{e}"
end

```

```python Python
import json
from datetime import date, datetime
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, api, models

configuration = Configuration(
)

with ApiClient(configuration) as api_client:
    o_auth_token_refresh_request = models.OAuthTokenRefreshRequest(
        grant_type="refresh_token",
        refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
    )

    try:
        response = api.OAuthApi(api_client).oauth_token_refresh(
            o_auth_token_refresh_request=o_auth_token_refresh_request,
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling OAuthApi#oauth_token_refresh: %s\n" % e)

```

```go OAuth Token Refresh Example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.hellosign.com/oauth/token?refresh="

	payload := strings.NewReader("{\n  \"grant_type\": \"refresh_token\",\n  \"refresh_token\": \"hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```swift OAuth Token Refresh Example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "grant_type": "refresh_token",
  "refresh_token": "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.hellosign.com/oauth/token?refresh=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```