---
title: "client token"
method: GET
path: "/client_token/typeahead"
tags: ["Additional Endpoints"]
---

# client token

`GET /client_token/typeahead`

If a client-facing web page is making requests directly to our service, it will need an access token. To avoid exposing your main account's token to the public, we recommend using temporary client tokens. The process looks like this:
- When generating page content, your server asks the Regrid API for a temporary client token limited to typeahead calls (details below). You can create as many of these as desired, for free.
- The javascript autocomplete widget uses this token to call Typeahead API
- If it's invalid or expired, the request will return an HTTP code 400. You may wish to refresh the page to regenerate the client token

## Query parameters

- `token` string, required
- `exp` number

## Response `200`

sucessful response

- object
  - `token` string — This is the client-side access token that can be used for typeahead requests.
  - `expires_at` number — A unix timestamp for the time after which this token is no longer valid.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.dev/regrid/apis/regrid-openapi-specification.md) · [All operations](https://skmtc.dev/regrid/apis/regrid-openapi-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/regrid/regrid-openapi-specification/revisions/e4abb9a7fcfe/schema)
