Your service can send notification using Notification ID obtained from the client as follows:
URL |
/nnapi/1.0/nid/{NID} NID: Notification ID; must be URL encoded Note:
This is a cURL command. For more information, see Testing Service using cURL. |
Method |
POST |
Parameters |
201 Created
The notification request was received and stored by the Notification server for future delivery (consumer is offline and notification will be delivered when consumer is back online).
202 Accepted
The notification request was received and accepted to be directly delivered by the Notification server (consumer is online).
204 No content
Consumer is offline when notification request was received, application has been uninstalled or notifications are switched off by the user. In this case consumer is not able to receive this message.
400 Bad Request
Read the response body to check the error cause. It can be one of the following:
Maximum length exceeded for enc, ctype, title, subtitle, type or icon.
Target Notification ID not specified. Add correct Notification ID to your request.
Unknown version. Only version 1.0 is currently supported. Any other version (or no version) returns 400 Bad Request.
Notification ID incorrect. Check that you have correct Notification ID in request and that it's for correct site.
Notification ID is not for this site.
Request contains illegal characters. Only characters allowed by XML 1.0 specification are supported.
Response when Notification ID is not for this site but site is known:
<?xml version="1.0" encoding="UTF-8"?> <notificationerror> <id desc="Recipient whose site is not current">{ID}</id> <site desc="Address of site where id belongs to">{CORRECT SITE BASE URI}</site> </notificationerror>
Response when Notification ID is not for this site and site is not known:
<?xml version="1.0" encoding="UTF-8"?> <notificationerror> <id desc="Recipient whose site is not current">{ID}</id> </notificationerror>
401 Unauthorized
Authorisation failed. Incorrect service credentials.
Application ID incorrect. Check that you have correct Application ID in request.
TCP/TLS connection for the HTTP requests may not be persistent. Make sure that your service uses a persistent TCP/TLS connection for the HTTP requests.
Forbidden service. Service access to Nokia Notifications API is forbidden.
408 Request Timeout
There was no indication that the message has been delivered to the server. This does not cover situations when the message cannot be delivered to the actual mobile device, for example, because of fade out from the wireless network coverage.
413 Request Entity Too Large
Payload exceeded maximum size 1.5 kB i.e., 1536 bytes.
500 Internal Server Error
Server encountered an unrecoverable error.
503 Service unavailable
Maximum number of notifications that can be sent over an hour was exceeded.
Sending notification
Request POST URL
https://alpha.one.ovi.com/nnapi/1.0/nid/NIDexample1
Request POST DATA
payload=Test+notification
curl --digest -u "<service_id>:<service_secret>" -d "payload=Test notification" https://alpha.one.ovi.com/nnapi/1.0/nid/NIDexample1
Response DATA
HTTP/1.1 202 Accepted Content-Length:2 OK