> For the complete documentation index, see [llms.txt](https://docs.verbdata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verbdata.com/environment-settings/authentication/auth-endpoint.md).

# Authentication Endpoint

The Auth Endpoint is configured as a callback to your API. After a user is authenticated by your application and the Verb javascript is rendered and token information is supplied, this is the endpoint Verb will call to verify the user’s legitimate and retrieve any user-specific data used for data filtering.

You can configure the auth endpoint’s properties with parameters passed in from the javascript:

* Http Method
  * The method Verb will use to call the endpoint.
  * i.e. GET, POST, PUT, etc.
* Endpoint
  * The URL Verb will call on every authentication attempt.
  * i.e. <https://www.myapp.com/api/user>, https\://**{{subdomain}}**.myapp.com/auth?uid=**{{userID}}**
* Headers
  * Any headers required by the auth endpoint.
  * i.e. “Authentication Bearer **{{bearerToken}}**”
* Body
  * The body to be sent with the request (for POST, PUT, etc HTTP methods).
  * This can be formatted as raw JSON/XML or as Form Data (optionally URL encoded).

#### Example 1 - GET with Bearer token passed in header

<table data-header-hidden><thead><tr><th width="198.0493001284023">Property</th><th>Value</th></tr></thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>GET</code></td></tr><tr><td><strong>Endpoint</strong></td><td>http://www.myapp.com/api/user</td></tr><tr><td><strong>Headers</strong></td><td>Authentication: <code>Bearer {{bearerToken}}</code><br>Accept: <code>application/json</code></td></tr><tr><td><strong>Embedding Code</strong></td><td><code>&#x3C;script></code><br>  <code>window.verbAsyncInit = function() {</code><br>    <code>Verb.init({</code><br>      <code>apiKey     : "REPLACE_WITH_API_KEY",</code><br>      <code>version    : "v1.0",</code><br>      <code>authParams :</code> <br>      <code>{</code><br>        <code>"bearerToken": "eyJraWQiOiJNt...aHBwVDdsZyI6IlJ"</code><br>      <code>},</code> <br>    <code>});</code><br>  <code>};</code><br><code>&#x3C;/script></code></td></tr><tr><td><strong>Response</strong></td><td><code>{</code><br> <code>"userID": "4a4ab95d-3bf4-4766-a6a6-f94b00d36d3c",</code><br> <code>"role": "Manager",</code><br> <code>"organizationID": "3c9977fb-b58c-4281-a9c7-fe58eb2c95ff"</code><br><code>}</code></td></tr></tbody></table>

#### Example 2 - POST with dynamic URL, Bearer & API key passed in header, JSON body

<table data-header-hidden><thead><tr><th width="200">Property</th><th>Value</th></tr></thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>POST</code></td></tr><tr><td><strong>Endpoint</strong></td><td>http://<strong>{{subdomain}}</strong>.myapp.com/api/user</td></tr><tr><td><strong>Headers</strong></td><td><p>Authentication: <code>Bearer {{bearerToken}}</code><br>X-Api-Key: <code>99ffddee-5f12-4b2d-bf35-a75bf9160715</code><br>Content-Type: <code>application/json</code></p><p>Accept: <code>application/json</code></p></td></tr><tr><td><strong>Body</strong></td><td><p><code>{</code>                     </p><p>  <code>"userID": "{{userID}}"</code></p><p><code>}</code>                     </p></td></tr><tr><td><strong>Embedding Code</strong></td><td><code>&#x3C;script></code><br>  <code>window.verbAsyncInit = function() {</code><br>    <code>Verb.init({</code><br>      <code>apiKey     : "REPLACE_WITH_API_KEY",</code><br>      <code>version    : "v1.0",</code><br>      <code>authParams :</code> <br>      <code>{</code><br>        <code>"bearerToken": "eyJraWQiOiJNt...aHBwVDdsZyI6IlJ",</code><br>        <code>"subdomain": "client-x",</code><br>        <code>"userID": "c8d23505-dee1-4eef-b03a-989282e924e1"</code><br>      <code>},</code> <br>    <code>});</code><br>  <code>};</code><br><code>&#x3C;/script></code></td></tr><tr><td><strong>Response</strong></td><td><code>{</code><br> <code>"userID": "4a4ab95d-3bf4-4766-a6a6-f94b00d36d3c",</code><br> <code>"role": "Manager",</code><br> <code>"organizationID": "3c9977fb-b58c-4281-a9c7-fe58eb2c95ff"</code><br><code>}</code></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.verbdata.com/environment-settings/authentication/auth-endpoint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
