HowTo: Register an application to use OneSignal services

Unofficial Content
This documentation is valid for:

The App ID and REST API Key are the credentials to identify your smart device application in OneSignal platform in order to send push notifications.
This document describes the mechanism to get them from OneSignal website.

 

Step 1 - Get certificates

Get the certificates for each platform deployed.
Refer to:

 

Step 2 - Login

Go to OneSignal site, enter your user credentials and log in.
OneSignal - Step 1 - Login

 

Step 3 - Create a new app

Select "Add a new app" option on the OneSignal's dashboard.
OneSignal - Step 2_1 - Add app

Enter an name for your application in OneSignal.
OneSignal - Step 2_2 - App name

A wizard will be displayed with four steps:

  1. Select a platform to deploy.
    GeneXus only supports Android and iOS. 
    OneSignal - Step 2_3_1 - Select platform
    Note: First, you must indicate one, then you can update your OneSignal app from its settings and add the other one.
     
  2. Give the certificates obtained in step 1 depending on the platform you select in the previous step.
    OneSignal - Step 2_3_1 - Give certificates
     
  3. Select SDK is not necessary, you can skip it.
     
  4. Install SDK is not necessary, you can skip it.

 

Step 4 - Get the credentials

On "App settings" option, select "Key & IDs" tab section and get the OneSignal's App ID and REST API Key.
OneSignal - Step 3 - Get credentials

 

OneSignal error Codes

The following list describes those errors that can be obtained when using Notification Provider API with OneSingal.

  • 1: Unkown error. See Error Description for more details.
  • 3: OneSignal Object ID is required: Method parameter "OneSignal Object ID" (Provider DeviceId) was not set. 
  • 4: iOS invalid device token: Device Token specified is not valid.
  • 5: "GCMSenderId is required". GCMSenderId must be specified in OneSignalPush Config. 
  • 6: Device Token is required. 
  • 7: No channels specified. At least 1 channel must be set. 
  • 10: "Application ID parameter is Required": ApplicationId must be specified in OneSignalPush Config. 
  • 11: "REST API Key parameter is Required": RestAPIKey must be specified in OneSignalPush Config. 
  • 112: Invalid Channel Name: Error code indicating an invalid channel name. A channel name is either an empty string (the broadcast channel) or contains only a-zA-Z0-9_* characters and starts with a letter
  • 114: Invalid Device Token
  • 140: Exceeded_Quota: Error code indicating that an application quota was exceeded.