6. Device registration endpoints¶
Default django-fcm
endpoints:
- /fcm/v1/devices/
- /fcm/v1/devices/{id}/
Note
Command python manage.py fcm_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/fcm/v1/devices/
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/fcm/v1/devices/{id}/