All URIs are relative to https://api.hellosign.com/v3
Method | HTTP request | Description |
---|---|---|
oauth_token_generate |
POST /oauth/token |
OAuth Token Generate |
oauth_token_refresh |
POST /oauth/token?refresh |
OAuth Token Refresh |
<OAuthTokenResponse> oauth_token_generate(o_auth_token_generate_request)
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.
require "dropbox-sign"
oauth_api = Dropbox::Sign::OAuthApi.new
data = Dropbox::Sign::OAuthTokenGenerateRequest.new
data.state = "900e06e2"
data.code = "1b0d28d90c86c141"
data.client_id = "cc91c61d00f8bb2ece1428035716b"
data.client_secret = "1d14434088507ffa390e6f5528465"
begin
result = oauth_api.oauth_token_generate(data)
p result
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<OAuthTokenResponse>, Integer, Hash)> oauth_token_generate_with_http_info(o_auth_token_generate_request)
begin
# OAuth Token Generate
data, status_code, headers = api_instance.oauth_token_generate_with_http_info(o_auth_token_generate_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <OAuthTokenResponse>
rescue Dropbox::Sign::ApiError => e
puts "Error when calling OAuthApi->oauth_token_generate_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
o_auth_token_generate_request |
OAuthTokenGenerateRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
<OAuthTokenResponse> oauth_token_refresh(o_auth_token_refresh_request)
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.
require "dropbox-sign"
oauth_api = Dropbox::Sign::OAuthApi.new
data = Dropbox::Sign::OAuthTokenRefreshRequest.new
data.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"
begin
result = oauth_api.oauth_token_refresh(data)
p result
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<OAuthTokenResponse>, Integer, Hash)> oauth_token_refresh_with_http_info(o_auth_token_refresh_request)
begin
# OAuth Token Refresh
data, status_code, headers = api_instance.oauth_token_refresh_with_http_info(o_auth_token_refresh_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <OAuthTokenResponse>
rescue Dropbox::Sign::ApiError => e
puts "Error when calling OAuthApi->oauth_token_refresh_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
o_auth_token_refresh_request |
OAuthTokenRefreshRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json