PushCredentials
Methods
AddPushCredential
Adds push credentials.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
OptionalThe application id
application_name:
string
OptionalThe 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
OptionalThe 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
OptionalThe 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
Binds push credentials to applications.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
intlist
The application ID list separated by semicolons (;). Use the 'all' value to select all applications
bind:
boolean
OptionalWhether 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
Removes push credentials.
To call this method, make sure your service account has one of the following roles:
Parameters
push_credential_id:
number
The push credentials id
Returns
result:
number
GetPushCredential
Gets push credentials.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
OptionalThe id of the bound application
application_name:
string
OptionalThe name of the bound application
push_credential_id:
number
OptionalThe push credentials id
push_provider_id:
number
OptionalThe 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
OptionalThe push provider name. The possible values are APPLE, APPLE_VOIP, GOOGLE, HUAWEI
with_cert:
boolean
OptionalWhether to get the user's certificate
Returns
result:
SetPushCredential
Modifies push credentials.
To call this method, make sure your service account has one of the following roles:
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