Push notifications
GET/api/v1.1/push/state
Get push state
Pixelfed only User token Scope push
Returns
curl "https://pixelfed.social/api/v1.1/push/state" \
-H "Accept: application/json" \
-H "Authorization: Bearer $TOKEN"Response
{
"version": "1.0",
"username": "dansup",
"profile_id": "2",
"notify_enabled": true,
"has_token": true,
"notify_like": true,
"notify_follow": true,
"notify_mention": true,
"notify_comment": false
}POST/api/v1.1/push/compare
Compare push token
Pixelfed only User token Scope push
Body parameters
expo_tokenstringrequiredReturns
curl -X POST "https://pixelfed.social/api/v1.1/push/compare" \
-H "Accept: application/json" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"expo_token": "ExponentPushToken[xH7kQ2mLp9Rt4vB1nC8dZe]"
}'Response
{
"version": "1.0",
"username": "dansup",
"profile_id": "2",
"notify_enabled": true,
"match": false,
"has_existing": true
}POST/api/v1.1/push/update
Update push settings
Pixelfed only User token Scope push
Body parameters
tokenstringrequirednotify_enabledbooleanrequirednotify_likebooleannotify_followbooleannotify_mentionbooleannotify_commentbooleanReturns
curl -X POST "https://pixelfed.social/api/v1.1/push/update" \
-H "Accept: application/json" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"token": "ExponentPushToken[xH7kQ2mLp9Rt4vB1nC8dZe]",
"notify_enabled": true,
"notify_like": true,
"notify_follow": true,
"notify_mention": true
}'Response
{
"version": "1.0",
"notify_enabled": true,
"has_token": true,
"notify_like": true,
"notify_follow": true,
"notify_mention": true,
"notify_comment": false
}POST/api/v1.1/push/disable
Disable push
Pixelfed only User token Scope push
Returns
curl -X POST "https://pixelfed.social/api/v1.1/push/disable" \
-H "Accept: application/json" \
-H "Authorization: Bearer $TOKEN"Response
{
"version": "1.0",
"username": "dansup",
"profile_id": "2",
"notify_enabled": false,
"has_token": false,
"notify_like": false,
"notify_follow": false,
"notify_mention": false,
"notify_comment": false
}