All URIs are relative to https://api.hellosign.com/v3
Method | HTTP request | Description |
---|---|---|
OauthTokenGenerate | POST /oauth/token | OAuth Token Generate |
OauthTokenRefresh | POST /oauth/token?refresh | OAuth Token Refresh |
OAuthTokenResponse OauthTokenGenerate (OAuthTokenGenerateRequest oAuthTokenGenerateRequest)
OAuth Token Generate
Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call.
using System;
using System.Collections.Generic;
using System.IO;
using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;
public class Example
{
public static void Main()
{
var config = new Configuration();
var oAuthApi = new OAuthApi(config);
var data = new OAuthTokenGenerateRequest(
state: "900e06e2",
code: "1b0d28d90c86c141",
clientId: "cc91c61d00f8bb2ece1428035716b",
clientSecret: "1d14434088507ffa390e6f5528465"
);
try
{
var result = oAuthApi.OauthTokenGenerate(data);
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// OAuth Token Generate
ApiResponse<OAuthTokenResponse> response = apiInstance.OauthTokenGenerateWithHttpInfo(oAuthTokenGenerateRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OAuthApi.OauthTokenGenerateWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
oAuthTokenGenerateRequest | OAuthTokenGenerateRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
4XX | failed_operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OAuthTokenResponse OauthTokenRefresh (OAuthTokenRefreshRequest oAuthTokenRefreshRequest)
OAuth Token Refresh
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.
using System;
using System.Collections.Generic;
using System.IO;
using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;
public class Example
{
public static void Main()
{
var config = new Configuration();
var oAuthApi = new OAuthApi(config);
var data = new OAuthTokenRefreshRequest(
refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"
);
try
{
var result = oAuthApi.OauthTokenRefresh(data);
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// OAuth Token Refresh
ApiResponse<OAuthTokenResponse> response = apiInstance.OauthTokenRefreshWithHttpInfo(oAuthTokenRefreshRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OAuthApi.OauthTokenRefreshWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
oAuthTokenRefreshRequest | OAuthTokenRefreshRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | * X-RateLimit-Limit - * X-RateLimit-Remaining - * X-Ratelimit-Reset - |
4XX | failed_operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]