Sha256: 61fd253b01bd06467b35bfca4206321703a432352e2a53e5f709f6b2ac284318

Contents?: true

Size: 659 Bytes

Versions: 6

Compression:

Stored size: 659 Bytes

Contents

require "dropbox-sign"

Dropbox::Sign.configure do |config|
  # Configure HTTP basic authorization: api_key
  config.username = "YOUR_API_KEY"

  # or, configure Bearer (JWT) authorization: oauth2
  # config.access_token = "YOUR_ACCESS_TOKEN"
end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dropbox-sign-1.1.2 examples/OauthTokenGenerate.rb
dropbox-sign-1.1.1 examples/OauthTokenGenerate.rb
dropbox-sign-1.1.0 examples/OauthTokenGenerate.rb
dropbox-sign-1.0.1 examples/OauthTokenGenerate.rb
dropbox-sign-1.0.0 examples/OauthTokenGenerate.rb
dropbox-sign-1.0.0.pre.beta2301 examples/OauthTokenGenerate.rb