Download the PHP package onesignal/onesignal-php-api without Composer
On this page you can find all versions of the php package onesignal/onesignal-php-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package onesignal-php-api
OneSignal
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
For more information, please visit https://onesignal.com.
Installation & Usage
Requirements
PHP 7.3 and later.
Composer
To install the bindings via Composer, add the following to composer.json
:
Then run composer install
Usage examples
Imports
Constants
Configure authorization
Notifications
Creating a notification model
Sending a notification immediately
Scheduling a notification to be sent in 24 hours
Sending a notification using Filters
Send this notification only to the users that have not spent any USD on IAP.
Sending a notification immediately
Retrieving a notification
Listing notifications by application ID
Getting notification history
Players
Creating a new Player model
Creating a Player
Getting a Player
Getting a list of Players
Deleting a player
Exporting players into CSV-spreadsheet
Segments
Creating a segment
Setting up the segment itself
Deleting a segment
Working with Apps
Getting an app
Getting a list of apps
Updating an app
Outcomes
Live Activities
Begin Live Activity
Update Live Activity
End Live Activity
Users
Creating a user
Fetch user by an alias
Update user
Delete user
Create subscription
Update subscription
Delete subscription
Delete Alias
Fetch aliases by subscription id
Fetch aliases by another alias
Identify user by subscription id
Identify user by another alias
Transfer subscription to another user
Fetch in app messages
API Endpoints
All URIs are relative to https://api.onesignal.com
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | beginLiveActivity | POST /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity |
DefaultApi | cancelNotification | DELETE /notifications/{notification_id} | Stop a scheduled or currently outgoing notification |
DefaultApi | createApp | POST /apps | Create an app |
DefaultApi | createNotification | POST /notifications | Create notification |
DefaultApi | createPlayer | POST /players | Add a device |
DefaultApi | createSegments | POST /apps/{app_id}/segments | Create Segments |
DefaultApi | createSubscription | POST /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | |
DefaultApi | createUser | POST /apps/{app_id}/users | |
DefaultApi | deleteAlias | DELETE /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | |
DefaultApi | deletePlayer | DELETE /players/{player_id} | Delete a user record |
DefaultApi | deleteSegments | DELETE /apps/{app_id}/segments/{segment_id} | Delete Segments |
DefaultApi | deleteSubscription | DELETE /apps/{app_id}/subscriptions/{subscription_id} | |
DefaultApi | deleteUser | DELETE /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
DefaultApi | endLiveActivity | DELETE /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity |
DefaultApi | exportEvents | POST /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events |
DefaultApi | exportPlayers | POST /players/csv_export?app_id={app_id} | Export CSV of Players |
DefaultApi | fetchAliases | GET /apps/{app_id}/subscriptions/{subscription_id}/user/identity | |
DefaultApi | fetchUser | GET /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
DefaultApi | fetchUserIdentity | GET /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
DefaultApi | getApp | GET /apps/{app_id} | View an app |
DefaultApi | getApps | GET /apps | View apps |
DefaultApi | getEligibleIams | GET /apps/{app_id}/subscriptions/{subscription_id}/iams | |
DefaultApi | getNotification | GET /notifications/{notification_id} | View notification |
DefaultApi | getNotificationHistory | POST /notifications/{notification_id}/history | Notification History |
DefaultApi | getNotifications | GET /notifications | View notifications |
DefaultApi | getOutcomes | GET /apps/{app_id}/outcomes | View Outcomes |
DefaultApi | getPlayer | GET /players/{player_id} | View device |
DefaultApi | getPlayers | GET /players | View devices |
DefaultApi | identifyUserByAlias | PATCH /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
DefaultApi | identifyUserBySubscriptionId | PATCH /apps/{app_id}/subscriptions/{subscription_id}/user/identity | |
DefaultApi | transferSubscription | PATCH /apps/{app_id}/subscriptions/{subscription_id}/owner | |
DefaultApi | updateApp | PUT /apps/{app_id} | Update an app |
DefaultApi | updateLiveActivity | POST /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push |
DefaultApi | updatePlayer | PUT /players/{player_id} | Edit device |
DefaultApi | updatePlayerTags | PUT /apps/{app_id}/users/{external_user_id} | Edit tags with external user id |
DefaultApi | updateSubscription | PATCH /apps/{app_id}/subscriptions/{subscription_id} | |
DefaultApi | updateUser | PATCH /apps/{app_id}/users/by/{alias_label}/{alias_id} |
Models
- App
- BasicNotification
- BasicNotificationAllOf
- BasicNotificationAllOfAndroidBackgroundLayout
- BeginLiveActivityRequest
- Button
- CancelNotificationSuccessResponse
- CreateNotificationSuccessResponse
- CreatePlayerSuccessResponse
- CreateSegmentConflictResponse
- CreateSegmentSuccessResponse
- CreateSubscriptionRequestBody
- CreateUserConflictResponse
- CreateUserConflictResponseErrorsInner
- CreateUserConflictResponseErrorsItemsMeta
- DeletePlayerNotFoundResponse
- DeletePlayerSuccessResponse
- DeleteSegmentNotFoundResponse
- DeleteSegmentSuccessResponse
- DeliveryData
- ExportEventsSuccessResponse
- ExportPlayersRequestBody
- ExportPlayersSuccessResponse
- Filter
- FilterExpressions
- GenericError
- GenericErrorErrorsInner
- GetNotificationRequestBody
- InlineResponse200
- InlineResponse2003
- InlineResponse201
- InlineResponse202
- InvalidIdentifierError
- Notification
- Notification200Errors
- NotificationAllOf
- NotificationHistorySuccessResponse
- NotificationSlice
- NotificationTarget
- NotificationWithMeta
- NotificationWithMetaAllOf
- Operator
- OutcomeData
- OutcomesData
- PlatformDeliveryData
- PlatformDeliveryDataEmailAllOf
- PlatformDeliveryDataSmsAllOf
- Player
- PlayerNotificationTarget
- PlayerNotificationTargetIncludeAliases
- PlayerSlice
- PropertiesDeltas
- PropertiesObject
- Purchase
- RateLimiterError
- Segment
- SegmentNotificationTarget
- StringMap
- SubscriptionObject
- TransferSubscriptionRequestBody
- UpdateLiveActivityRequest
- UpdateLiveActivitySuccessResponse
- UpdatePlayerSuccessResponse
- UpdatePlayerTagsRequestBody
- UpdatePlayerTagsSuccessResponse
- UpdateSubscriptionRequestBody
- UpdateUserRequest
- User
- UserIdentityRequestBody
- UserIdentityResponse
- UserSubscriptionOptions
Authorization
All the OneSignal endpoints require either an app_key or user_key tokens for authorization. It is recommended to set up both of those keys during the initial config initialization so that you don't need to worry about which endpoint requires app_key and which user_key. You can get the value of these keys from your user settings pages.
app_key
- Type: Bearer authentication
user_key
- Type: Bearer authentication
Author
- API version:
1.3.0
- Package version:
2.1.0
- Package version:
All versions of onesignal-php-api with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0