...
Once you've built up the input string as shown above, it should be hashed using HMAC-SHA256 using the secret obtained in the Brokerage management console in the Broker Exchange. In Ruby, this might look like this:
{html}<script src="https://gist.github.com/jwcobb/c6a47d51a94a64637c52.js"></script>{html}
Code Block | ||||
---|---|---|---|---|
| ||||
require 'base64' require 'openssl' secret = "xyz" request = "GET api.ticketevolution.com/v9/brokerages?page=1&per_page=1" digest = OpenSSL::Digest::Digest.new('sha256') signature = Base64.encode64(OpenSSL::HMAC.digest(digest, secret, request)).chomp puts signature # => "ohGcFIHF3vg75A8Kpg42LNxuQpQZJsTBKv8xnZASzu0=" |
...