1. Daniel Gustavo
    Daniel Gustavo avatar
    1 posts
    Member since:
    Nov 2013

    Posted 10 Feb 2014 Link to this post

    Hi, I'm trying to run the Baas Push Notification sample in my Telerik App Builder, but when the App runs, it shows a message that says: Missing API Key.

    In the file main.js I have a variable called  baasApiKey = 'BAAS_API_KEY'; I guess I should to put my API Key here, but I can't find it anywhere. I've been searching in my Profile, Account, etc.

    Could you help me to find it? Thanks so much.
  2. Answer
    Anton Dobrev
    Anton Dobrev avatar
    605 posts

    Posted 10 Feb 2014 Link to this post


    From a given workspace in your Telerik Platform account select an existing or add a new 'Backend services' project. The API key is its unique identifier and is accessible from the 'API Keys' section in the left navigation pane of a given project.

    To enable the 'Push notifications' feature in the backend project head to Settings > Push notifications and select the platform you would like to target. More detailed information on this is available here.
    In brief:
    • For setting up Push notifications for iOS follow this blog post
    • For setting up Push notifications for Android:
    1. Head to https://cloud.google.com/console/project and create a new project or use existing one
    2. Enter the Project Number in the sample AppBuilder project as 'androidProjectNumber'
    3. While exploring the project head to Apis & Auth > Credentials. Scroll down to Public API access and add new Client ID for a server application
    4. Enter the obtained API Key in the backend project under Settings > Push notifications > Android

    Now as the sample app is configured for use with Telerik Backend Services, locate the boolean variable 'emulatorMode' which is by default set to false. Set it to true if you just want to check the functionality (enable notifications, register a device, update registration, etc.) which can be done through the simulator. The registered devices can be viewed in the backend portal under the 'Devices' tab. Note that push notifications could not be received in the AppBuilder's simulator. Revert the value of the variable to 'false' when deploying the app to a device so that you can test it in real-world scenario.

    Let us know if this works for you.

    Anton Dobrev
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
Back to Top