---
title: "API: requestHMACValidation"
slug: "api-requesthmacvalidation"
updated: 2022-09-12T18:39:45Z
published: 2022-09-12T18:39:45Z
canonical: "support.smarteru.com/api-requesthmacvalidation"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.smarteru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API: requestHMACValidation

- 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](https://support.smarteru.com/v1/docs/user-profile-information#access-level) have access to the requestHMACValidation method.

## API Call XML Package

```markup
<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.

```markup
<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.

| Tag | Description |
| --- | --- |
| **ID** | The user's system-generated identifier. This tag is mutually exclusive with the Email and EmployeeID tags. |
| **Email** | The [user's email address](https://support.smarteru.com/docs/user-login-information#primary-email-required-if-employee-id-not-specified). This tag is mutually exclusive with the ID and EmployeeID tags. |
| **EmployeeID** | The [user's employee ID](https://support.smarteru.com/docs/user-login-information#employee-id-required-if-primary-email-not-specified). 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](https://support.smarteru.com/docs/page-configuration-for-custom-menu-pages#append-hmac).

## API Response XML Package

The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-requesthmacvalidation#error-codes) tag.

```markup
<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.

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

   <Errors>
   </Errors>

</SmarterU>
```

## Error Codes

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

## Related

- [Account: Custom Menu Items](/account-custom-menu-items.md)
- [Page: Configuration for Custom Menu Pages](/page-configuration-for-custom-menu-pages.md)
- [Verifying an HMAC](/verifying-an-hmac.md)
