---
title: "Get user districts"
method: GET
path: "/GetUserDistricts"
tags: ["Locations"]
---

# Get user districts

`GET /GetUserDistricts`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/GetUserDistricts`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/GetUserDistricts/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `page` integer, required
- `pageSize` integer
- `searchExpression` string

## Response `200`

The requested districts are in the response.

- ServiceChannelServicesMessagingLocationGetUserDistrictsResponse: Response details object.
  - `Districts` string[]: Districts
  - `TotalCount` integer: Total number of items on all pages;

## Other responses

- `401`: The request is not authorized. <br/>Error codes: 401 — User has no permissions to perform this action
- `500`: The server was unable to complete the request due to an internal error. <br/>Error codes: 501 — Value of pageSize or page is less than 1

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
