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

  • push_provider_name:

    string

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

  • push_provider_id:

    number

    The push provider id. Can be used instead of push_provider_name

  • application_id:

    number

    Optional

    The application id

  • application_name:

    string

    Optional

    The application name that can be used instead of application_id

  • credential_bundle:

    string

    Optional

    The bundle of Android/iOS/Huawei application

  • 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

  • is_dev_mode:

    boolean

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

  • 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

  • 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

  • huawei_application_id:

    string

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

Returns

  • result:

    number

  • push_credential_id:

    number

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

  • push_credential_id:

    number

    The push credentials id

  • 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

  • is_dev_mode:

    boolean

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

  • 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

  • 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

  • huawei_application_id:

    string

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

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

  • push_credential_id:

    number

    Optional

    The push credentials id

  • push_provider_name:

    string

    Optional

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

  • push_provider_id:

    number

    Optional

    The push provider id. Can be used instead of push_provider_name

  • application_name:

    string

    Optional

    The name of the bound application

  • application_id:

    number

    Optional

    The id of the bound application

  • with_cert:

    boolean

    Optional

    Set true to get the user's certificate

Returns

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

  • push_credential_id:

    intlist

    The push credentials ID list separated by semicolon (;)

  • application_id:

    intlist

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

  • bind:

    boolean

    Optional

    Set to false for unbind. Default value is true

Returns

  • result:

    number