# Get the sign-in rules

```http
GET https://trydimmi.com/api/v1/workspace/access-policy
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:read`.

## Response 200 (OK)

- `data` (object, required)
  - `allowed_sign_in_methods` (string[] | null, required): The ways of signing in the workspace accepts, such as password, magic_link, google or sso. Empty means every way is accepted.
  - `api_ip_allowlist` (object[] | null, required): Address ranges access tokens may call the API from. Empty means from anywhere.
    - `cidr` (string, required): An address range in CIDR form, or a single IP address, such as 203.0.113.0/24.
    - `label` (string, required): What the workspace calls this range, such as Office.
  - `available_sign_in_methods` (string[] | null, required): The ways of signing in this install offers, such as password, magic_link, google or sso. allowed_sign_in_methods must be picked from these.
  - `dashboard_ip_allowlist` (object[] | null, required): Address ranges browsers and apps may use the dashboard from. Empty means from anywhere.
    - `cidr` (string, required): An address range in CIDR form, or a single IP address, such as 203.0.113.0/24.
    - `label` (string, required): What the workspace calls this range, such as Office.
  - `google_allowed_domains` (string[] | null, required): Google hosted domains a Google sign-in may come from, such as example.com. Empty means any.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `require_two_factor` (boolean, required): Whether members must use two-factor authentication to use the workspace.
  - `session_idle_timeout_minutes` (integer | null, required): Minutes a session may sit unused before it ends, from 15 to 20160. Null means no limit.
  - `session_max_age_minutes` (integer | null, required): Minutes a session may last in total before signing in again, from 60 to 43200. Null means no limit.
  - `sso_enforced` (boolean, required): True when the organization enforces a single sign-on connection for this workspace.
  - `tokens_outside` (integer, required): How many live tokens were last used from an address outside api_ip_allowlist, so the list would stop them. 0 when the list is empty.
  - `your_ip` (string, required): The IP address the caller is seen at, such as 203.0.113.7. Empty when it is not known.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request GET \
  --url 'https://trydimmi.com/api/v1/workspace/access-policy' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": {
    "allowed_sign_in_methods": [
      "<string>"
    ],
    "api_ip_allowlist": [
      {
        "cidr": "<string>",
        "label": "<string>"
      }
    ],
    "available_sign_in_methods": [
      "<string>"
    ],
    "dashboard_ip_allowlist": [
      {
        "cidr": "<string>",
        "label": "<string>"
      }
    ],
    "google_allowed_domains": [
      "<string>"
    ],
    "object": "<string>",
    "require_two_factor": true,
    "session_idle_timeout_minutes": 123,
    "session_max_age_minutes": 123,
    "sso_enforced": true,
    "tokens_outside": 123,
    "your_ip": "<string>"
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
