6. Device registration endpoints¶
Default django-gcm
endpoints:
- /gcm/v1/device/register/
- /gcm/v1/device/unregister/
Note
Command python manage.py gcm_urls
returns the current endpoints.
6.1. Register¶
POST parameters:
dev_id
- Unique device identifier
reg_id
- Registration token
name
- Optional device name
curl -X POST -H "Content-Type: application/json" -d '{"dev_id": "test", "reg_id":"abcd", "name":"test device"}' \
http://localhost:8000/gcm/v1/device/register/
6.2. Unregister¶
POST parameters:
dev_id
- Unique device identifier
curl -X POST -H "Content-Type: application/json" -d '{"dev_id": "test"}' http://localhost:8000/gcm/v1/device/unregister/