{"_id":"56d1f33a00a2a70b00b365b4","__v":13,"category":{"_id":"56d1f33900a2a70b00b36593","__v":2,"project":"5526c95cf69851170038b48f","version":"56d1f33700a2a70b00b3658e","pages":["56d1f33a00a2a70b00b365aa","56d1f33a00a2a70b00b365ab","56d1f33a00a2a70b00b365ac","56d1f33a00a2a70b00b365ad","56d1f33a00a2a70b00b365ae","56d1f33a00a2a70b00b365af","56d1f33a00a2a70b00b365b0","56d1f33a00a2a70b00b365b1","56d1f33a00a2a70b00b365b2","56d1f33a00a2a70b00b365b3","56d1f33a00a2a70b00b365b4","56d1f33a00a2a70b00b365b5","56d1f33a00a2a70b00b365b6","56d1f33a00a2a70b00b365b7","56d1f33a00a2a70b00b365b8","56d1f33a00a2a70b00b365b9","56d1f33a00a2a70b00b365ba","56d1f33a00a2a70b00b365bb","56d1f33a00a2a70b00b365bc","56d1f33a00a2a70b00b365bd","56d1f33a00a2a70b00b365be","56d1f33a00a2a70b00b365bf","56d1f33a00a2a70b00b365c0","56d31b848161a00b00dc458a"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-10T15:00:49.659Z","from_sync":false,"order":3,"slug":"ionic-push","title":"Ionic Push"},"user":"5526ca4cf69851170038b496","version":{"_id":"56d1f33700a2a70b00b3658e","project":"5526c95cf69851170038b48f","__v":2,"createdAt":"2016-02-27T19:04:23.946Z","releaseDate":"2016-02-27T19:04:23.946Z","categories":["56d1f33900a2a70b00b3658f","56d1f33900a2a70b00b36590","56d1f33900a2a70b00b36591","56d1f33900a2a70b00b36592","56d1f33900a2a70b00b36593","56d1f33900a2a70b00b36594","56d1f33900a2a70b00b36595","56d1f33900a2a70b00b36596","56d1f33900a2a70b00b36597","56d1f33900a2a70b00b36598","56d1f33900a2a70b00b36599","56d1f33900a2a70b00b3659a","571f9497ada30c34003b7cee"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta","version_clean":"2.0.0-beta","version":"2.0.0-beta"},"project":"5526c95cf69851170038b48f","parentDoc":null,"updates":["56e1b4af4241650e005b7c6d"],"next":{"pages":[],"description":""},"createdAt":"2015-08-13T20:15:30.874Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"When we encounter problems with sending a push notification's individual messages, we note a number of error codes to help you debug your application.  You will find detailed descriptions of each below.\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Beta Notice\",\n  \"body\": \"Still getting errors such as `Push Error Code 301: See http://docs.ionic.io/docs/push-error-codes for more info.`?\\n\\nYou need to the [Platform Beta](http://docs.ionic.io/v2.0.0-beta/docs/migration-guide), as these are deprecated, legacy messages.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Service Errors\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`INVALID`\",\n    \"0-1\": \"Something went very, very wrong on our end.  Check out our [status page](http://status.ionic.io/) to make sure the service is available\",\n    \"1-0\": \"`UNKNOWN`\",\n    \"1-1\": \"An unknown error occurred while processing your message.  GCM or APN may be experiencing trouble, or the Ionic Platform may have encountered an error.\",\n    \"2-0\": \"`UNABLE_TO_AUTH`\",\n    \"2-1\": \"We were unable to authenticate using the token you provided.  Make sure you've [generated it](doc:api-getting-started) correctly.\",\n    \"3-0\": \"`NO_CREDENTIAL`\",\n    \"3-1\": \"We couldn't find the relevant credential on the [security profile](doc:security-profiles) you specified.  If you haven't created one, follow the [iOS Push Profiles](doc:ios-push-profiles) or [Android Push Profiles](doc:android-push-profiles) guide now.\",\n    \"4-0\": \"`INVALID_MESSAGE_FORMAT`\",\n    \"4-1\": \"You've sent a push notification with an invalid body.  For help with notification customizations, follow the [sending push](doc:push-sending-push) guide.\",\n    \"5-0\": \"`ILLEGAL_CREDENTIAL_FORMAT`\",\n    \"5-1\": \"The security credential on the profile you specified was invalid.  You may need to regenerate and re-upload it.\",\n    \"7-0\": \"`NO_VALID_TOKENS`\",\n    \"7-1\": \"Your request didn't target any valid tokens.  If you're sending via [user ID's](doc:push-usage#section-integrating-with-ionic-user), ensure that they have device tokens saved to them.\",\n    \"8-0\": \"`INVALID_TOKEN`\",\n    \"8-1\": \"This individual message targeted a device token that has been marked invalid.  You may need to re-register the device.\",\n    \"6-0\": \"`INVALID_CREDENTIAL_PASSWORD`\",\n    \"6-1\": \"The certificate password in the security credential on the profile you specified was incorrect. You can verify the certificate password before regenerating the security credential by using OpenSSL (`openssl pkcs12 -in Certificates.p12`).\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"APN Errors\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`APNS_BAD_TOPIC`\",\n    \"0-1\": \"The APNS topic was bad. This usually means the bundle ID in the certificate used to send your push does not match your app.\",\n    \"1-0\": \"`APNS_TOPIC_DISALLOWED`\",\n    \"1-1\": \"Sending pushes to the APNS topic was not allowed. Are Apple Push Notifications enabled for your app? Is the bundle ID of your certificate correct?\",\n    \"2-0\": \"`APNS_BAD_DEVICE_TOKEN`\",\n    \"2-1\": \"The specified device token was bad. Verify that you specified a valid token and that your Security Profile's type (development/production) matches your push certificate's type.\",\n    \"3-0\": \"`APNS_DEVICE_TOKEN_NOT_FOR_TOPIC`\",\n    \"3-1\": \"The device token does not match the specified topic. This means you may be using a device token from a different app.\",\n    \"4-0\": \"`APNS_UNREGISTERED`\",\n    \"4-1\": \"The device token is no longer active for your app.\",\n    \"5-0\": \"`APNS_BAD_CERTIFICATE_ENVIRONMENT`\",\n    \"5-1\": \"Your certificate was used in the wrong environment (production vs development). You may have a misconfigured Security Profile.\",\n    \"6-0\": \"`APNS_BAD_CERTIFICATE`\",\n    \"6-1\": \"For some reason, your certificate was bad. APNS does not tell us more. Try regenerating the certificate for your app.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GCM Errors\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`GCM_INVALID_AUTH`\",\n    \"1-0\": \"`GCM_ERROR`\",\n    \"2-0\": \"`GCM_INVALID_REGISTRATION`\",\n    \"3-0\": \"`GCM_INVALID_PACKAGE`\",\n    \"4-0\": \"`GCM_MISMATCH_SENDER`\",\n    \"5-0\": \"`GCM_TOO_BIG`\",\n    \"6-0\": \"`GCM_INVALID_KEY`\",\n    \"7-0\": \"`GCM_INVALID_TTL`\",\n    \"8-0\": \"`GCM_UNKNOWN`\",\n    \"0-1\": \"Invalid Auth. This is caused by a few different things. See Android Setup for more info on these:\\n\\n* Incorrect or no GCM Project Number.\\n* Incorrect GCM API Key.\\n* You've set an IP Whitelist\\n* You haven't actually enabled the GCM service.\",\n    \"1-1\": \"Something has gone wrong on GCM's end. This should be rare, and only temporary if you do encounter it.\",\n    \"2-1\": \"This request contained an incorrect device token (`registration_id`). Check that you're entering the token in correctly, and that the device is registering for push notifications without error.\",\n    \"3-1\": \"Invalid package name. Make sure the message was addressed to a registration token whose package name matches the value passed in the request.\",\n    \"4-1\": \"Mismatched Sender ID. A registration token is tied to a certain group of senders. When a client app registers for GCM, it must specify which senders are allowed to send messages. You should use one of those sender IDs when sending messages to the client app. If you switch to a different sender, the existing registration tokens won't work.\",\n    \"5-1\": \"Message too big. Check that the total size of the payload data included in a message does not exceed GCM limits: 4096 bytes for most messages, or 2048 bytes in the case of messages to topics or notification messages on iOS. This includes both the keys and the values.\",\n    \"6-1\": \"Invalid Data Key. Check that the payload data does not contain a key (such as from, or gcm, or any value prefixed by google) that is used internally by GCM. Note that some words (such as collapse_key) are also used by GCM but are allowed in the payload, in which case the payload value will be overridden by the GCM value.\",\n    \"7-1\": \"Invalid TTL (Time to live). Check that the value used in time_to_live is an integer representing a duration in seconds between 0 and 2,419,200 (4 weeks).\",\n    \"8-1\": \"Something went wrong on our send while communicating with GCM, try again in a few minutes.\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]","excerpt":"Breakdown of error code responses given by the Push Service","slug":"push-error-codes","type":"basic","title":"Error Codes"}

Error Codes

Breakdown of error code responses given by the Push Service

When we encounter problems with sending a push notification's individual messages, we note a number of error codes to help you debug your application. You will find detailed descriptions of each below. [block:callout] { "type": "danger", "title": "Beta Notice", "body": "Still getting errors such as `Push Error Code 301: See http://docs.ionic.io/docs/push-error-codes for more info.`?\n\nYou need to the [Platform Beta](http://docs.ionic.io/v2.0.0-beta/docs/migration-guide), as these are deprecated, legacy messages." } [/block] [block:api-header] { "type": "basic", "title": "Service Errors" } [/block] [block:parameters] { "data": { "h-0": "Error Code", "h-1": "Description", "0-0": "`INVALID`", "0-1": "Something went very, very wrong on our end. Check out our [status page](http://status.ionic.io/) to make sure the service is available", "1-0": "`UNKNOWN`", "1-1": "An unknown error occurred while processing your message. GCM or APN may be experiencing trouble, or the Ionic Platform may have encountered an error.", "2-0": "`UNABLE_TO_AUTH`", "2-1": "We were unable to authenticate using the token you provided. Make sure you've [generated it](doc:api-getting-started) correctly.", "3-0": "`NO_CREDENTIAL`", "3-1": "We couldn't find the relevant credential on the [security profile](doc:security-profiles) you specified. If you haven't created one, follow the [iOS Push Profiles](doc:ios-push-profiles) or [Android Push Profiles](doc:android-push-profiles) guide now.", "4-0": "`INVALID_MESSAGE_FORMAT`", "4-1": "You've sent a push notification with an invalid body. For help with notification customizations, follow the [sending push](doc:push-sending-push) guide.", "5-0": "`ILLEGAL_CREDENTIAL_FORMAT`", "5-1": "The security credential on the profile you specified was invalid. You may need to regenerate and re-upload it.", "7-0": "`NO_VALID_TOKENS`", "7-1": "Your request didn't target any valid tokens. If you're sending via [user ID's](doc:push-usage#section-integrating-with-ionic-user), ensure that they have device tokens saved to them.", "8-0": "`INVALID_TOKEN`", "8-1": "This individual message targeted a device token that has been marked invalid. You may need to re-register the device.", "6-0": "`INVALID_CREDENTIAL_PASSWORD`", "6-1": "The certificate password in the security credential on the profile you specified was incorrect. You can verify the certificate password before regenerating the security credential by using OpenSSL (`openssl pkcs12 -in Certificates.p12`)." }, "cols": 2, "rows": 9 } [/block] [block:api-header] { "type": "basic", "title": "APN Errors" } [/block] [block:parameters] { "data": { "h-0": "Error Code", "h-1": "Description", "0-0": "`APNS_BAD_TOPIC`", "0-1": "The APNS topic was bad. This usually means the bundle ID in the certificate used to send your push does not match your app.", "1-0": "`APNS_TOPIC_DISALLOWED`", "1-1": "Sending pushes to the APNS topic was not allowed. Are Apple Push Notifications enabled for your app? Is the bundle ID of your certificate correct?", "2-0": "`APNS_BAD_DEVICE_TOKEN`", "2-1": "The specified device token was bad. Verify that you specified a valid token and that your Security Profile's type (development/production) matches your push certificate's type.", "3-0": "`APNS_DEVICE_TOKEN_NOT_FOR_TOPIC`", "3-1": "The device token does not match the specified topic. This means you may be using a device token from a different app.", "4-0": "`APNS_UNREGISTERED`", "4-1": "The device token is no longer active for your app.", "5-0": "`APNS_BAD_CERTIFICATE_ENVIRONMENT`", "5-1": "Your certificate was used in the wrong environment (production vs development). You may have a misconfigured Security Profile.", "6-0": "`APNS_BAD_CERTIFICATE`", "6-1": "For some reason, your certificate was bad. APNS does not tell us more. Try regenerating the certificate for your app." }, "cols": 2, "rows": 7 } [/block] [block:api-header] { "type": "basic", "title": "GCM Errors" } [/block] [block:parameters] { "data": { "h-0": "Error Code", "h-1": "Description", "0-0": "`GCM_INVALID_AUTH`", "1-0": "`GCM_ERROR`", "2-0": "`GCM_INVALID_REGISTRATION`", "3-0": "`GCM_INVALID_PACKAGE`", "4-0": "`GCM_MISMATCH_SENDER`", "5-0": "`GCM_TOO_BIG`", "6-0": "`GCM_INVALID_KEY`", "7-0": "`GCM_INVALID_TTL`", "8-0": "`GCM_UNKNOWN`", "0-1": "Invalid Auth. This is caused by a few different things. See Android Setup for more info on these:\n\n* Incorrect or no GCM Project Number.\n* Incorrect GCM API Key.\n* You've set an IP Whitelist\n* You haven't actually enabled the GCM service.", "1-1": "Something has gone wrong on GCM's end. This should be rare, and only temporary if you do encounter it.", "2-1": "This request contained an incorrect device token (`registration_id`). Check that you're entering the token in correctly, and that the device is registering for push notifications without error.", "3-1": "Invalid package name. Make sure the message was addressed to a registration token whose package name matches the value passed in the request.", "4-1": "Mismatched Sender ID. A registration token is tied to a certain group of senders. When a client app registers for GCM, it must specify which senders are allowed to send messages. You should use one of those sender IDs when sending messages to the client app. If you switch to a different sender, the existing registration tokens won't work.", "5-1": "Message too big. Check that the total size of the payload data included in a message does not exceed GCM limits: 4096 bytes for most messages, or 2048 bytes in the case of messages to topics or notification messages on iOS. This includes both the keys and the values.", "6-1": "Invalid Data Key. Check that the payload data does not contain a key (such as from, or gcm, or any value prefixed by google) that is used internally by GCM. Note that some words (such as collapse_key) are also used by GCM but are allowed in the payload, in which case the payload value will be overridden by the GCM value.", "7-1": "Invalid TTL (Time to live). Check that the value used in time_to_live is an integer representing a duration in seconds between 0 and 2,419,200 (4 weeks).", "8-1": "Something went wrong on our send while communicating with GCM, try again in a few minutes." }, "cols": 2, "rows": 9 } [/block]