# getUserClaim

Brixxapi allows user to set a claim value. This claim Value gets added when user gets logged in. It is used to identify users claim. For example, to check whether a user is someone who he claims to be or not. By using this function, we can get userClaim and make useful comparisons in our apps.

### Parameters

1. claimName - This is the only paramter this function takes. It is the claiName which should be in the form of string.. Brixxapi allows user to add claim name with or with out "claim\_" prefix.

#### Example

```
Let suppose we have a claimName parameter "EFitDealer" then Brixxapi will consider both "EFitDealer" and "claim_EFitDealer" as same.
```

### Example Usages

We can use "getUserClaim" function to get user's claim, a way to check user identity. As a parameter, we need to provide the claimName to this function. We can provide only the claimName or the claimName plus "claim\_" as prefix. Lets see both of them in action. We have a claimName "EfitDealerNumber", now we want to get userClaim:

Lets first do it without prefix "claim\_".

```javascript
   let dealerNumber = brixxApi.getUserClaim("EfitDealerNumber");
   console.log("The dealer Number is: " + dealerNumber);
```

It is ame as the previous example but now we use prefix.

```javascript
   let dealerNumber = brixxApi.getUserClaim("claim_EfitDealerNumber");
   console.log("The dealer Number is: " + dealerNumber);
```

An important thing to notice here is that it is required by Brixxbox that for using SQL Parameters for claims must have to start with the "claim\_" prefix.

For example, Userclaims can also be used as SQL parameters:

```sql
   select @claim_EfitDealerNumber
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brixxbox.gitbook.io/brixxbox-documentation/client-api-reference/functions/getuserclaim.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
