> For the complete documentation index, see [llms.txt](https://docs.emsigner.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emsigner.com/apis/api-reference/authentication/access-tokens.md).

# Access Tokens

## POST /auth/token

> Generate access token

```json
{"openapi":"3.0.1","info":{"title":"emSigner Core API","version":"v1"},"tags":[{"name":"Auth"}],"servers":[{"url":"https://demoapi-core.emsigner.com","description":"Demo / Sandbox"},{"url":"{baseUrl}","description":"Custom environment","variables":{"baseUrl":{"default":"https://demoapi-core.emsigner.com","description":"Base URL of your emSigner environment (e.g. production or on-prem API host)"}}}],"security":[],"paths":{"/auth/token":{"post":{"tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.TokenRequest"}}}},"responses":{"200":{"description":"OK"}},"summary":"Generate access token","operationId":"post__auth_token"}}},"components":{"schemas":{"emSignerCoreAPI.Shared.DTOs.TokenRequest":{"type":"object","properties":{"appId":{"type":"string","nullable":true},"appSecret":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

## POST /auth/portal/login

> Portal login

```json
{"openapi":"3.0.1","info":{"title":"emSigner Core API","version":"v1"},"tags":[{"name":"Auth"}],"servers":[{"url":"https://demoapi-core.emsigner.com","description":"Demo / Sandbox"},{"url":"{baseUrl}","description":"Custom environment","variables":{"baseUrl":{"default":"https://demoapi-core.emsigner.com","description":"Base URL of your emSigner environment (e.g. production or on-prem API host)"}}}],"security":[],"paths":{"/auth/portal/login":{"post":{"tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.LoginRequest"}}}},"responses":{"200":{"description":"OK"}},"summary":"Portal login","operationId":"post__auth_portal_login"}}},"components":{"schemas":{"emSignerCoreAPI.Shared.DTOs.LoginRequest":{"type":"object","properties":{"username":{"type":"string","nullable":true},"password":{"type":"string","nullable":true},"browserInfo":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.BrowserInfo"},"loginNonce":{"type":"string","nullable":true}},"additionalProperties":false},"emSignerCoreAPI.Shared.DTOs.BrowserInfo":{"type":"object","properties":{"browserName":{"type":"string","nullable":true},"browserVersion":{"type":"string","nullable":true},"osName":{"type":"string","nullable":true},"osVersion":{"type":"string","nullable":true},"device":{"type":"string","nullable":true},"ipAddress":{"type":"string","nullable":true},"timeZone":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

## POST /auth/bo/login

> Back-office login

```json
{"openapi":"3.0.1","info":{"title":"emSigner Core API","version":"v1"},"tags":[{"name":"Auth"}],"servers":[{"url":"https://demoapi-core.emsigner.com","description":"Demo / Sandbox"},{"url":"{baseUrl}","description":"Custom environment","variables":{"baseUrl":{"default":"https://demoapi-core.emsigner.com","description":"Base URL of your emSigner environment (e.g. production or on-prem API host)"}}}],"security":[],"paths":{"/auth/bo/login":{"post":{"tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.LoginRequest"}}}},"responses":{"200":{"description":"OK"}},"summary":"Back-office login","operationId":"post__auth_bo_login"}}},"components":{"schemas":{"emSignerCoreAPI.Shared.DTOs.LoginRequest":{"type":"object","properties":{"username":{"type":"string","nullable":true},"password":{"type":"string","nullable":true},"browserInfo":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.BrowserInfo"},"loginNonce":{"type":"string","nullable":true}},"additionalProperties":false},"emSignerCoreAPI.Shared.DTOs.BrowserInfo":{"type":"object","properties":{"browserName":{"type":"string","nullable":true},"browserVersion":{"type":"string","nullable":true},"osName":{"type":"string","nullable":true},"osVersion":{"type":"string","nullable":true},"device":{"type":"string","nullable":true},"ipAddress":{"type":"string","nullable":true},"timeZone":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

## POST /auth/refresh

> Refresh access token

```json
{"openapi":"3.0.1","info":{"title":"emSigner Core API","version":"v1"},"tags":[{"name":"Auth"}],"servers":[{"url":"https://demoapi-core.emsigner.com","description":"Demo / Sandbox"},{"url":"{baseUrl}","description":"Custom environment","variables":{"baseUrl":{"default":"https://demoapi-core.emsigner.com","description":"Base URL of your emSigner environment (e.g. production or on-prem API host)"}}}],"security":[],"paths":{"/auth/refresh":{"post":{"tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.RefreshtokenRequest"}}}},"responses":{"200":{"description":"OK"}},"summary":"Refresh access token","operationId":"post__auth_refresh"}}},"components":{"schemas":{"emSignerCoreAPI.Shared.DTOs.RefreshtokenRequest":{"type":"object","properties":{"refreshToken":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```
