-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathApiAppCreateExample.rb
37 lines (31 loc) · 1.06 KB
/
ApiAppCreateExample.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "json"
require "dropbox-sign"
Dropbox::Sign.configure do |config|
config.username = "YOUR_API_KEY"
# config.access_token = "YOUR_ACCESS_TOKEN"
end
oauth = Dropbox::Sign::SubOAuth.new
oauth.callback_url = "https://example.com/oauth"
oauth.scopes = [
"basic_account_info",
"request_signature",
]
white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new
white_labeling_options.primary_button_color = "#00b3e6"
white_labeling_options.primary_button_text_color = "#ffffff"
api_app_create_request = Dropbox::Sign::ApiAppCreateRequest.new
api_app_create_request.name = "My Production App"
api_app_create_request.domains = [
"example.com",
]
api_app_create_request.custom_logo_file = File.new("CustomLogoFile.png", "r")
api_app_create_request.oauth = oauth
api_app_create_request.white_labeling_options = white_labeling_options
begin
response = Dropbox::Sign::ApiAppApi.new.api_app_create(
api_app_create_request,
)
p response
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling ApiAppApi#api_app_create: #{e}"
end