• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
J

Joseph Wiemer

@Joseph Wiemer
About
Posts
10
Topics
1
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    'INVALID_TOKEN' When Sending Push Notifications
  • J Joseph Wiemer

    I'm getting an INVALID_TOKEN error when calling scheduleNormalizedPushNotificationMinutes() from cloud code. The "Send Notification" button in the BrainCloud dashboard also fails to work.

    braincloud1.JPG

    1. I've correctly uploaded/configured my .p12 file etc.
    2. I'm correctly retrieving the device token from the client, and it shows up on the BrainCloud dashboard.
    3. My Apple certs/profiles etc. are in order.
                    var alertContentJson = {
                        "body": "content of message",
                        "title": "message title"
                    };
                    var customDataJson = {
                        "field1": "value1",
                        "field2": "value2"
                    };
                    var minutesFromNow = 1;
                    var otherPlayerId = "someId";
                    var pushNotificationProxy = bridge.getPushNotificationServiceProxy();
                    
                    var postResult = pushNotificationProxy.scheduleNormalizedPushNotificationMinutes(otherPlayerId, alertContentJson, customDataJson, minutesFromNow);
    

  • 'INVALID_TOKEN' When Sending Push Notifications
  • J Joseph Wiemer

    Ok guys, I've solved it! It was some godforsaken problem with my .p12 file.

    1. Tried creating a .p12 file by exporting both the private key and the cert. FAILED.
    2. Tried creating a .p12 file by exporting just the private key. FAILED.
    3. Tried creating a .p12 file by exporting just the cert. SUCCESS.

    So, notifications are now working for me. Not sure how to mark this question as solved, but it's solved. Thanks for all your help!

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users