Ruby creates HMAC signature which contains several elements

In my pure Ruby app one of the components to create a token for my request authentication to an external API is to create signature which is HMAC value that is created using the api_key and the secret_key. The signature contains the following elements that are each separated by a new line \n (except the last line) and are in the same order as below list:

  ts = '1529342939277'
  nonce = '883b170c-a768-41a1-ae6d-c626323aa128'
  host = ''
  resource_path = '/restws/identity/v3/accounts/11111/workflows/rdp.test.workflow/conversations'
  body_hash = 'fQoIAs0IO4vNleZVE9tcI3Ni7h+niT+GrrgEHsKZOyM='

  API_KEY = '6njQLkz7uCiz1ZeJ1bFCWX4DFVTfKQXa'
  SECRET_KEY = 'CcdaZEt7co647iJoEc5G29CHtlo7T9M3'
  # create string signature separated by new line
  signature = [ts, nonce, host, resource_path, body_hash].join("\n")
  # create HMAC for signature
  mac = Base64.strict_encode64(OpenSSL::HMAC.hexdigest('SHA256', API_KEY, signature))

2.7.0 :146 > mac

According to the docs the signature should be Syb6i+sRygAGCgxLQJ4NwwKcT5Mnkh4r3QXgwZ3vmcE= but I'm getting ZDE4NDQxZDdiNmZkODNiODgyODI4Nzc2OTQ3OGFlMjVhZTMyNThhZTZlMTRiMjkxMzI0NmQ5NzljNDJkZWVhZg== instead. Where did I go wrong?

I've got an example how to do it in Java if something will be unclear:

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum