Rate this page:

PushCredentials

Methods

AddPushCredential

Copy URL

Adds push credentials.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
AddPushCredential example

AddPushCredential example

Add new Apple credentials.

Parameters

  • application_id:

    number

    Optional

    The application id

  • application_name:

    string

    Optional

    The application name that can be used instead of application_id

  • cert_content:

    string

    Public and private keys in PKCS12 format. Credentials for APPLE push

  • cert_file_name:

    string

    Optional

    The parameter is required, when set 'cert_content' as POST body. Credentials for APPLE push

  • cert_password:

    string

    The secret password for private key. Credentials for APPLE push

  • credential_bundle:

    string

    Optional

    The bundle of Android/iOS/Huawei application

  • huawei_application_id:

    string

    The application id, provided by Huawei. Credentials for HUAWEI push

  • huawei_client_id:

    string

    The client id, provided by Huawei. Credentials for HUAWEI push

  • huawei_client_secret:

    string

    The client secret, provided by Huawei. Credentials for HUAWEI push

  • is_dev_mode:

    boolean

    Whether to use this certificate in apple's sandbox environment. Credentials for APPLE push

  • push_provider_id:

    number

    The push provider id. Can be used instead of push_provider_name. The possible values are: 1 — APPLE, 2 — GOOGLE, 3 — APPLE_VOIP, 5 — HUAWEI.

  • push_provider_name:

    string

    The push provider name. The possible values are APPLE, APPLE_VOIP, GOOGLE, HUAWEI

  • sender_id:

    string

    The sender id, provided by Google. Credentials for GOOGLE push

  • server_key:

    string

    The server key, provided by Google. Credentials for GOOGLE push

  • service_account_file:

    string

    The service account key file, provided by Google. Can be used instead of server_key. Credentials for GOOGLE push

Returns

  • push_credential_id:

    number

  • result:

    number

BindPushCredential

Copy URL

Binds push credentials to applications.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
BindPushCredential example

BindPushCredential example

Bind the push credential to the application.

Parameters

  • application_id:

    intlist

    The application ID list separated by semicolons (;). Use the 'all' value to select all applications

  • bind:

    boolean

    Optional

    Whether to bind or unbind (set true or false respectively)

  • push_credential_id:

    intlist

    The push credentials ID list separated by semicolons (;)

Returns

  • result:

    number

DelPushCredential

Copy URL

Removes push credentials.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
DelPushCredential example

DelPushCredential example

Remove credentials.

Parameters

  • push_credential_id:

    number

    The push credentials id

Returns

  • result:

    number

GetPushCredential

Copy URL

Gets push credentials.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
GetPushCredential example

GetPushCredential example

Get push credentials.

Parameters

  • application_id:

    number

    Optional

    The id of the bound application

  • application_name:

    string

    Optional

    The name of the bound application

  • push_credential_id:

    number

    Optional

    The push credentials id

  • push_provider_id:

    number

    Optional

    The push provider id. Can be used instead of push_provider_name. The possible values are: 1 — APPLE, 2 — GOOGLE, 3 — APPLE_VOIP, 5 — HUAWEI.

  • push_provider_name:

    string

    Optional

    The push provider name. The possible values are APPLE, APPLE_VOIP, GOOGLE, HUAWEI

  • with_cert:

    boolean

    Optional

    Whether to get the user's certificate

Returns

SetPushCredential

Copy URL

Modifies push credentials.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
SetPushCredential example

SetPushCredential example

Modify credentials.

Parameters

  • cert_content:

    string

    Public and private keys in PKCS12 format. Credentials for APPLE push

  • cert_password:

    string

    The secret password for private key. Credentials for APPLE push

  • huawei_application_id:

    string

    The application id, provided by Huawei. Credentials for HUAWEI push

  • huawei_client_id:

    string

    The client id, provided by Huawei. Credentials for HUAWEI push

  • huawei_client_secret:

    string

    The client secret, provided by Huawei. Credentials for HUAWEI push

  • is_dev_mode:

    boolean

    Whether to use this certificate in apple's sandbox environment. Credentials for APPLE push

  • push_credential_id:

    number

    The push credentials id

  • sender_id:

    string

    The sender id, provided by Google. Credentials for GOOGLE push

  • server_key:

    string

    The server key, provided by Google. Credentials for GOOGLE push

  • service_account_file:

    string

    The service account key file, provided by Google. Can be used instead of server_key. Credentials for GOOGLE push

Returns

  • result:

    number