Sha256: 973e96ded7b8a19a074358da00eb795be6d44f5c73d1bea2a05180aaac609f42

Contents?: true

Size: 944 Bytes

Versions: 14

Compression:

Stored size: 944 Bytes

Contents

require "dropbox-sign"

# use your API key
api_key = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"

# callback_data represents data we send to you
callback_data = {
  event: {
    event_type:     "account_confirmed",
    event_time:     "1669926463",
    event_hash:     "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f",
    event_metadata: {
      related_signature_id:    nil,
      reported_for_account_id: "6421d70b9bd45059fa207d03ab8d1b96515b472c",
      reported_for_app_id:     nil,
      event_message:           nil,
    },
  },
}

callback_event = Dropbox::Sign::EventCallbackRequest.init(callback_data)

# verify that a callback came from HelloSign.com
if Dropbox::Sign::EventCallbackHelper.is_valid(api_key, callback_event)
  # one of "account_callback" or "api_app_callback"
  callback_type = Dropbox::Sign::EventCallbackHelper.get_callback_type(callback_event)

  # do your magic below!
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dropbox-sign-1.8.0 examples/EventCallback.rb
dropbox-sign-1.7.0 examples/EventCallback.rb
dropbox-sign-1.6.1 examples/EventCallback.rb
dropbox-sign-1.6.0 examples/EventCallback.rb
dropbox-sign-1.5.0 examples/EventCallback.rb
dropbox-sign-1.4.1 examples/EventCallback.rb
dropbox-sign-1.4.0 examples/EventCallback.rb
dropbox-sign-1.3.0 examples/EventCallback.rb
dropbox-sign-1.2.0 examples/EventCallback.rb
dropbox-sign-1.1.2 examples/EventCallback.rb
dropbox-sign-1.1.1 examples/EventCallback.rb
dropbox-sign-1.1.0 examples/EventCallback.rb
dropbox-sign-1.0.1 examples/EventCallback.rb
dropbox-sign-1.0.0 examples/EventCallback.rb