> For the complete documentation index, see [llms.txt](https://apidocs.zerionsoftware.com/doc/iformbuilder-v80/llms.txt)

# Register a WebForms Browser

> POST /profiles/{profile_id}/users/{user_id}/browser_tokens
> 
> Registers the caller's current browser for WebForms, or refreshes its existing registration, and enforces the server's per-user browser limit (`webformTokenLimit`) on the server.
> 
> ### Request body
> 
> Optional. Send `{}` (or no body) for a browser with no registration yet, or `{ "browser_token": "..." }` with the value an earlier call returned to this browser.
> 
> ### Behaviour
> 
> 1. Registrations created before the last daily reset are removed. The reset happens every day at the UTC hour set by `webformTokenExpireAt` (0-23).
> 2. If `browser_token` names one of the user's live registrations, it is refreshed and the same token is returned (`200`). A token that is unknown, expired or someone else's is treated as absent.
> 3. Otherwise a new random token is issued (`201`), unless the user already holds `webformTokenLimit` live registrations (`409`).
> 
> The limit check and the insert run in one transaction that locks the user, so concurrent registrations cannot exceed the limit. A limit of `-1` is unlimited (`remaining` and `resets_at` are `null`); a limit of `0` refuses every registration with `403`.
> 
> ### Authorization
> 
> Standard bearer token. `user_id` must be the caller (`self` or the caller's own id). Company and server admins, and internal clients, cannot register a browser for another user.
> 
> `browser_token` is only ever returned to its owner, by this endpoint. Keep it in the browser and send it back on the next registration.



## Servers
- https://api.iformbuilder.com/exzact/api/v80/[servername]: https://api.iformbuilder.com/exzact/api/v80/[servername]


## Authentication methods
- Oauth2


## Parameters
### Headers

- **Authorization** (string)
  e.g. Bearer {access_token}


### Path parameters

- **profile_id** (string)
  id of the profile

- **user_id** (string)
  id of the user; must be the caller



### Body: application/json (object)

- **browser_token** (string)
  the token an earlier registration returned to this browser



## Responses
### 200
OK - `browser_token` named one of the user's live registrations; it was refreshed and the count is unchanged.

#### Body: application/json (object)
- **id** (integer)
  the registration id, for `DELETE .../browser_tokens/{browser_token_id}`

- **browser_token** (string)
  this browser's token; send it back on the next registration

- **browser_count** (integer)
  the user's live registrations, this one included

- **remaining** (integer | null)
  registrations left before the limit; null when the limit is -1 (unlimited)

- **resets_at** (string | null)
  the next daily reset (UTC), when registrations from before it stop counting; null when the limit is -1


### 201
Created - a new registration was added for this browser.

#### Body: application/json (object)
- **id** (integer)
  the registration id, for `DELETE .../browser_tokens/{browser_token_id}`

- **browser_token** (string)
  this browser's token; send it back on the next registration

- **browser_count** (integer)
  the user's live registrations, this one included

- **remaining** (integer | null)
  registrations left before the limit; null when the limit is -1 (unlimited)

- **resets_at** (string | null)
  the next daily reset (UTC), when registrations from before it stop counting; null when the limit is -1


### 400
Bad Request - the body is not a JSON object, or `browser_token` is not a string of at most 50 characters.

### 401
Unauthorized - missing or invalid bearer token.

### 403
Forbidden - `user_id` is not the caller (no role or client may register a browser for another user), `profile_id` is not the caller's own profile, or the server's `webformTokenLimit` is `0` (no access to WebForms).

### 404
Not Found - `user_id` is not a user of `profile_id`.

### 409
Conflict - the user already holds `webformTokenLimit` live registrations. Nothing was added; retry after `resets_at`.

#### Body: application/json (object)
- **error_message** (string)

- **browser_count** (integer)
  the user's live registrations

- **resets_at** (string)
  the next daily reset (UTC), after which registration can succeed



[Powered by Bump.sh](https://bump.sh)
