API: requestHMACValidation
  • 1 Minute to read
  • Dark
    Light

API: requestHMACValidation

  • Dark
    Light

Article summary

  • Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
  • If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
  • Tags are required unless specified.

Description

The requestHMACValidation method verifies and claims an HMAC.

Who Has Access

Administrators and owners have access to the requestHMACValidation method.

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>requestHMACValidation</Method>

   <Parameters>
      <Security>
         <User>
            <ID><![CDATA[]]></ID>
               - OR -
            <Email><![CDATA[]]></Email>
               - OR -
            <EmployeeID><![CDATA[]]></EmployeeID>
         </User>
         <HMAC><![CDATA[]]></HMAC>
      </Security>
   </Parameters>
</SmarterU>

Security Tag Group

The Security tag group is a container for the user that generated the HMAC and the HMAC.

<Security>
   <User>
      <ID><![CDATA[]]></ID>
         - OR -
      <Email><![CDATA[]]></Email>
         - OR -
      <EmployeeID><![CDATA[]]></EmployeeID>
   </User>
   <HMAC><![CDATA[]]></HMAC>
</Security>

The Security tag contains the following.

User

The User tag is a container for the user that generated the HMAC. The User tag must contain one of the following.

TagDescription
IDThe user's system-generated identifier. This tag is mutually exclusive with the Email and EmployeeID tags.
EmailThe user's email address. This tag is mutually exclusive with the ID and EmployeeID tags.
EmployeeIDThe user's employee ID. This tag is mutually exclusive with the ID and Email tags.

HMAC

The HMAC that was generated when the user clicked on a custom menu link.

API Response XML Package

The API response XML package will always include a Result, Info, and Errors tag.

<SmarterU>
   <Result></Result>
   <Info>
      <User></User>
      <HMAC></HMAC>
   </Info>

   <Errors>
      <Error>
         <ErrorID></ErrorID>
         <ErrorMessage></ErrorMessage>
      </Error>
   </Errors>

</SmarterU>

The response may also contain the following. 

User

The user that claimed the HMAC. This will be the same value provided in the call.

HMAC

The HMAC provided in the call.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
   <Result>Success</Result>
   <Info>
      <User>123409</User>
      <HMAC>de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9</HMAC>
   </Info>

   <Errors>
   </Errors>

</SmarterU>

Error Codes

Error CodeMessage
RHV:01The user ID provided is not valid.
RHV:02The email address provided is not valid.
RHV:03The employee ID provided is not valid.
RHV:04The user was not found in the provided account.
RHV:05HMAC provided is not valid.

Was this article helpful?