Read the settings bound to a push token
GET
/notifications/mobile
const url = 'https://work.optidata.cloud/api/notifications/mobile';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://work.optidata.cloud/api/notifications/mobile \ --header 'Authorization: Bearer <token>'The mobile settings record associated with a push token, including whether push delivery is currently switched on for it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”push_notification_token
string
Required unless expo_token is sent.
expo_token
string
Legacy alias of push_notification_token.
Responses
Section titled “ Responses ”Settings for the token.
Media typeapplication/json
object
uuid
string format: uuid
push_notification_token
string
has_push_notifications
boolean
key
additional properties
any
Examplegenerated
{ "uuid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "push_notification_token": "example", "has_push_notifications": true}Missing, malformed or expired authentication key.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Examplemissing
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The request body or query string failed validation.
Media typeapplication/json
object
message
required
The first validation message.
string
errors
required
Validation messages keyed by field name.
object
key
additional properties
Array<string>
Examples
Exampleinvalid
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}Rate limit exceeded. Retry after the window resets.
Media typeapplication/json
Generic error envelope used by policy, binding and framework failures.
object
message
required
Human-readable description of the failure.
string
Examples
Examplethrottled
{ "message": "Too Many Attempts."}