SIGN UP

Managing push credentials

Methods

Add push credentials

Parameters

  • Follow link for authentication parameter names and details.

  • push_provider_name:

    string

    The push provider name. Available values: APPLE, APPLE_VOIP, GOOGLE.

  • push_provider_id:

    number

    The push provider id.

  • external_app_name:

    string

    The application name.

  • credential_bundle:

    string

    The bundle of Android/iOS application.

  • cert_content:

    string

    Public and private keys in PKCS12 format.

  • cert_file_name:

    string

    The parameter is required, when set 'cert_content' as POST body.

  • cert_password:

    string

    The secret password for private key.

  • is_dev_mode:

    boolean

    Set true for use this certificate in apple's sandbox environment

  • sender_id:

    string

    The sender id, provided by Google.

  • server_key:

    string

    The server key, provided by Google.

Returns

  • result:

    number
  • push_credential_id:

    number

Examples

request:

Add new Apple credentials.

curl --data-binary '@apple_certificate.p12' -H 'Content-type: application/x-pkcs12' 'https://api.voximplant.com/platform_api/AddPushCredential/?account_id=1&api_key=4ed6066e-4688-443a-90e8-3f8f8481287c&push_provider_name=APPLE&cert_password=12345678&cert_file_name=apple_certificate_name&is_dev_mode=false'

Add new Google credentials.

https://api.voximplant.com/platform_api/AddPushCredential/?account_id=1&api_key=4ed6066e-4688-443a-90e8-3f8f8481287c&push_provider_name=GOOGLE&sender_id=704777431520&server_key=AAAAjM-LQsc:APA91bGyCb5WhcGtaM-RaOI1GqWps1Uh9K-YoY75HIBy-En-4piH4c6_50gIEbSaCfuDrsLNfyZCvteiu6EjxA_rEBOvlc4xZ30uiGgbuM_jdT6y6Ku55OwnCyIxRNznvmx1jkkLexSU

response:

{
    "result": 1,
    "push_credential_id": 1
}

Bind push credentials to applications

Parameters

  • Follow link for authentication parameter names and details.

  • push_credential_id:

    string

    The push credentials ID list separated by the ';' symbol.

  • application_id:

    string

    The application ID list separated by the ';' symbol or the 'all' value.

  • bind:

    boolean

    Set to false for unbind. Default value is true.

Returns

  • result:

    number

Examples

request:

Bind push credential to application.

https://api.voximplant.com/platform_api/BindPushCredential/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&push_credential_id=1&application_id=1

response:

{
    "result": 1
}

Remove push credentials

Parameters

  • Follow link for authentication parameter names and details.

  • push_credential_id:

    number

    The push credentials id.

Returns

  • result:

    number

Examples

request:

Remove credentials.

https://api.voximplant.com/platform_api/DelPushCredential/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&push_credential_id=1

response:

{
    "result": 1
}

Get push credentials

Parameters

  • Follow link for authentication parameter names and details.

  • push_credential_id:

    number

    The push credentials id.

  • push_provider_name:

    string

    The push provider name. Available values: APPLE, APPLE_VOIP, GOOGLE.

  • push_provider_id:

    number

    The push provider id.

  • application_name:

    string

    The name of bound application.

  • application_id:

    number

    The id of bound application.

  • external_app:

    string

    The push provider's application name.

  • with_cert:

    boolean

    Set true to get the user's certificate.

  • with_secret_info:

    boolean

    Set true to get the certificate's password.

Returns

Examples

request:

Get push credentials.

https://api.voximplant.com/platform_api/GetPushCredential/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&push_credential_id=1

response:

{
    "result": [
        {
            "content": {
                "file_name": "apns.pkcs12"
            },
            "applications": [
                {
                    "application_id": 1,
                    "application_name": "test.test.voximplant.com"
                }
            ],
            "push_provider_id": 1,
            "external_app_name": "testapp",
            "push_credential_id": 1,
            "push_provider_name": "APPLE"
        }
    ]
}

Modify push credentials

Parameters

  • Follow link for authentication parameter names and details.

  • push_credential_id:

    number

    The push credentials id.

  • external_app_name:

    string

    The application name.

  • cert_content:

    string

    Public and private keys in PKCS12 format.

  • cert_password:

    string

    The secret password for private key.

  • is_dev_mode:

    boolean

    Set true for use this certificate in apple's sandbox environment

  • sender_id:

    string

    The sender id, provided by Google.

  • server_key:

    string

    The server key, provided by Google.

Returns

  • result:

    number

Examples

request:

Modify credentials.

https://api.voximplant.com/platform_api/SetPushCredential/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&push_credential_id=1&external_app_name=testapp&cert_password=1234567

response:

{
    "result": 1
}