# IRPCServerAdmin.GetNotificationSettings

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetNotificationSettings/

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Gets the server's notification settings and mail-sending configuration (without the SMTP
password).

- **Service:** [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md) `MFiles.IRPCServerAdmin`
- **gRPC method:** `/MFiles.IRPCServerAdmin/GetNotificationSettings`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-notification-settings`
- **Request:** [`GetNotificationSettingsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetNotificationSettings/index.md#request)
- **Response:** [`GetNotificationSettingsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetNotificationSettings/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires the system administrator server role (server right `edit_server_properties`).
  Denied for other callers.
- `oauth2_settings` is set only when OAuth 2.0 settings are stored.

<a id="request"></a>

## Request: GetNotificationSettingsRequest

No fields.

<a id="response"></a>

## Response: GetNotificationSettingsResponse

A structure that specifies the response type for the GetNotificationSettings method.

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `notifications_enabled` | `bool` | Tells if the notifications are enabled. |
| `digest_notification_message_hour_utc` | `uint32` | The hour (UTC, 0-23) when the daily digest messages are sent. |
| `digest_notification_message_minute_utc` | `uint32` | The minute (0-59) when the daily digest messages are sent. |
| `smtp_server` | `string` | The SMTP server for delivering notifications. Can be an IP address or a DNS name. |
| `smtp_connection_parameters` | [`SMTPConnectionParameters`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.SMTPConnectionParameters/index.md) | Parameters for SMTP connection. Values: `SMTPCONNECTION_PARAMETERS_STANDARD` (0), `SMTPCONNECTION_PARAMETERS_AUTHENTICATION_PLAIN` (1), `SMTPCONNECTION_PARAMETERS_AUTHENTICATION_LOGIN` (2), `SMTPCONNECTION_PARAMETERS_AUTHENTICATION_CRAM_MD5` (4). |
| `smtp_auth_username` | `string` | User name for SMTP authentication. |
| `smtp_mail_from_address` | `string` | The address of the sender when sending notifications. |
| `smtp_mail_from_display_name` | `string` | The display name of the sender when sending notifications. |
| `smtp_port` | `uint32` | The port the SMTP server is listening. |
| `mail_source_auth_type` | [`MailSourceAuthType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MailSourceAuthType/index.md) | The authentication method to use. Values: `MAIL_SOURCE_AUTH_TYPE_NONE` (0), `MAIL_SOURCE_AUTH_TYPE_BASIC` (1), `MAIL_SOURCE_AUTH_TYPE_OAUTH2` (2). |
| `oauth2_settings` | [`Oauth2NotificationSettings`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Oauth2NotificationSettings/index.md) | OAuth2 specific data. |
| `oauth2_settings.mail_source` | [`MailSourceOauth2`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MailSourceOauth2/index.md) | OAuth2 specific data. |
| `oauth2_settings.mail_source.type` | [`MailSourceOauth2Type`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MailSourceOauth2Type/index.md) | OAuth2 service to use. Values: `MAIL_SOURCE_OAUTH2_TYPE_NONE` (0), `MAIL_SOURCE_OAUTH2_TYPE_MICROSOFT_OAUTH2` (1), `MAIL_SOURCE_OAUTH2_TYPE_GOOGLE_OAUTH2` (2). |
| `oauth2_settings.mail_source.status` | [`MailSourceOauth2Status`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MailSourceOauth2Status/index.md) | Authentication status. Values: `MAIL_SOURCE_OAUTH2_STATUS_NONE` (0), `MAIL_SOURCE_OAUTH2_STATUS_ERROR` (1), `MAIL_SOURCE_OAUTH2_STATUS_AUTHENTICATED` (2), `MAIL_SOURCE_OAUTH2_STATUS_EXPIRED` (3). |
| `oauth2_settings.mail_source.user_info` | `string` | Information about the authenticated user (account name etc.). |
| `oauth2_settings.mail_source.configuration` | `string` | Configuration for authentication in JSON format as name-value pairs. Use names as defined in OAuth2 standard. |
| `oauth2_settings.mail_source.token_cache` | `bytes` | Token cache. For Google OAuth2 this is in JSON format. For MSAL this is in its internal binary format. |
| `oauth2_settings.mail_source.proxy_address` | `string` | Proxy address if used. |
| `oauth2_settings.mail_from_address` | `string` | The address of the sender when sending notifications with OAuth2. |
| `oauth2_settings.authentication_timeout` | `uint32` | Maximum time in seconds to wait for the OAuth2 authentication to take place. |
| `oauth2_settings.mail_service_timeout` | `uint32` | Maximum time seconds to wait for the OAuth2 mail service request to be responded. |
