[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Notification Service](../../index.md) > [Step-by-step guides](../index.md) > Mobile push notifications > Updating a push notification channel

# Updating a push notification channel

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), go to the folder containing the notification channel.
  1. Navigate to **Cloud Notification Service**.
  1. Click ![image](../../../_assets/console-icons/ellipsis.svg) next to the push notification channel and select **Edit**.
  1. On the **Mobile Push notifications** tab, edit the authentication parameters for your platform:

      **Apple iOS**
      
      * Select the **Authentication method**: `Token` or `Certificate`.
      
          * To authenticate with a token, you will need:
            * **Signature key**: File with the signature key that you will use to certify the authentication token.
                
                Create and download a signature key in your Apple developer account: **Certificates, Identifiers & Profiles** → **Keys** → ![image](../../../_assets/console-icons/circle-plus-fill.svg). You can download the key file only once.
            * **Key ID** (Key ID): Get the ID in your Apple developer account: **Certificates, Identifiers & Profiles** → **Keys**. Make sure the ID matches the signature key you downloaded in the previous step. It must be 10 characters long.
            * **Developer ID** (Team ID): You can find it in the top-right corner of your Apple developer account. It must be 10 characters long and contain only numbers and Latin letters.
            * **Bundle ID**: Get the [bundle ID](https://developer.apple.com/documentation/appstoreconnectapi/list_bundle_ids) in your Apple developer account: **Certificates, Identifiers & Profiles** → **Identifiers** or in the Xcode app: **Target** → **General** → **Identity**. It may contain only numbers, Latin letters, hyphens, and periods.
             
             Learn more about the token in [this Apple guide](https://developer.apple.com/documentation/usernotifications/establishing-a-token-based-connection-to-apns).
          
          * To authenticate with a certificate, you will need:
            * **Certificate**: SSL certificate file in `.pem` format.
            * **Private certificate key**: Key file in `.pem` format. 
          
            Learn more about the certificate in [this Apple guide](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns#2947597).
          
            To save the certificate and the private key in individual `.pem` files, use the [openssl](https://docs.openssl.org/1.1.1/man1/pkcs12) Linux utility:
            
            ```bash
            openssl pkcs12 -in Certificates.p12 -nokeys -nodes -out certificate.pem
            openssl pkcs12 -in Certificates.p12 -nocerts -nodes -out privatekey.pem
            ```
          
          Token-based authentication is preferred as a faster, more modern and secure option.
      
      * Select the **Environment**: `Development` or `Production`. Use `Development` to test the application.
      
      **Google Android**
      
      Specify which **FCM API version** will be used: `HTTP v1` or `Legacy`.
      
      You can authenticate with FCM using the API:
      * _HTTP v1 API_: You will need a **Google Cloud service account key in JSON format**. The key is used to generate OAuth 2.0 temporary tokens for authenticating requests in the FCM HTTP v1 API. You can get it in the Google Cloud management console.
      * _Legacy API_: You will need an **API key** (server key). You can get it in the Firebase management console.
      
      {% note info %}
      
      [FCM no longer supports](https://firebase.google.com/docs/cloud-messaging/migrate-v1) the legacy API starting June 2024.
      
      {% endnote %}
      
      For more information, see [this Firebase guide](https://firebase.google.com/docs/cloud-messaging/android/client).
      
      **Huawei Android**
      
      Explore the [HMS documentation](https://developer.huawei.com/consumer/en/doc/hmscore-common-Guides/get-started-hmscore-0000001212585589) and get the authentication parameters:
      * **Key ID**.
      * **API key**.
      
      **RuStore Android**
      
      See the [relevant RuStore article](https://www.rustore.ru/help/sdk/push-notifications/send-push-notifications) and get the authentication parameters:
      * **Project ID**.
      * **Service token**.
      
      You can get your authentication parameters in the RuStore developer console: **Push notifications** → **Projects**.

  1. Click ![image](../../../_assets/console-icons/plus.svg) **Add description** and enter a description for your notification channel.
  1. Click **Save**.

- AWS CLI {#aws-cli}

  1. If you do not have the AWS CLI yet, [install and configure it](../../../storage/tools/aws-cli.md).
  1. Run this command:

      ```bash
      aws sns set-platform-application-attributes \
        --platform-application-arn <notification_channel_ARN> \
        --attributes <parameter_1>=<new_value1>, ... <parameterN>=<new_valueN>
      ```

      Where:

      * `--platform-application-arn`: Notification channel ID (ARN).
      * `--attributes`: Comma-separated notification channel parameters you want to update, in `<parameter1>=<new_value1>` format.

      For more information about the `aws sns set-platform-application-attributes` command, see the [AWS documentation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sns/set-platform-application-attributes.html).

- AWS SDK for Python {#python}

  1. If you do not have the AWS SDK for Python (boto3) yet, [install and configure it](../../tools/sdk-python.md#aws-sdk).
  1. To update a push notification channel, use the following code:

      ```python
      response = client.set_platform_application_attributes(
          PlatformApplicationArn="<notification_channel_ARN>",
          Attributes={
              "<parameter_1>": "<new_value1>",
              ...
              "<parameterN>": "<new_valueN>"
          }
      )
      print("Attributes updated successfully.")
      ```

      Where:

      * `PlatformApplicationArn`: Notification channel ID (ARN).
      * `Attributes`: Comma-separated parameters you want to update, in `"<parameterN>": "<new_valueN>"` format.

- AWS SDK for PHP {#php}

  1. If you do not have the AWS SDK for PHP yet, [install and configure it](../../tools/sdk-php.md#aws-sdk).
  1. To update a push notification channel, use the following code:

      ```php
      $response = $client->setPlatformApplicationAttributes([
          'PlatformApplicationArn' => '<notification_channel_ARN>',
          'Attributes' => [
              '<parameter_1>' => '<new_value1>',
              ...
              '<parameterN>' => '<new_valueN>'
          ],
      ]);

      echo "Platform application attributes updated successfully.\n";
      ```

      Where:

      * `PlatformApplicationArn`: Notification channel ID (ARN).
      * `Attributes`: Comma-separated parameters you want to update, in `'<parameter>' => '<new_value>'` format.


- API {#api}

  Use the [setAttributes](../../api-ref/set-platform-application-attributes.md) HTTP API method for the PlatformApplications resource in Yandex Cloud Notification Service.

{% endlist %}

Updating a notification channel may take some time.