---
title: "Create a new token for the logged in user and store it for an external app"
method: POST
path: "/v1/apps/external/auth/"
---

# Create a new token for the logged in user and store it for an external app

`POST /v1/apps/external/auth/`

## Request

- Base URL: `https://app.iconik.io/API/auth`
- URL: `https://app.iconik.io/API/auth/v1/apps/external/auth/`
- Auth: none declared. Required headers: `App-ID`, `Auth-Token`
- TypeScript: <https://skmtc.dev/iconik/apis/iconik-auth/docs/v1/apps/external/auth/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `App-ID` string, required
- `Auth-Token` string, required

## Request body

- ExternalAuthRequestSchema
  - `app_id` string, uuid
  - `app_name` string
  - `redirect_info` RedirectInfoType
    - `headers` object, nullable
    - `url` string, url, nullable
  - `secret` string, required

## Response `201`

Returns an app_id

- ExternalAuthRequestResponseSchema
  - `app_id` string, uuid
  - `redirect_info` RedirectInfoType
    - `headers` object, nullable
    - `url` string, url, nullable

## Other responses

- `400`: Bad request
- `401`: Token is invalid
- `default`: Error response

---

[API](https://skmtc.dev/iconik/apis/iconik-auth.md) - [All operations](https://skmtc.dev/iconik/apis/iconik-auth/llms.txt) - [OpenAPI document](https://skmtc.dev/iconik/apis/iconik-auth/revisions/5dde985bb742?raw)
