@@ -52,15 +52,15 @@ use GuzzleHttp;
5252### Constants
5353``` php
5454const APP_ID = '<YOUR _APP_ID >';
55- const REST_KEY_TOKEN = '<YOUR _REST_API_KEY >'; // App REST API key required for most endpoints
56- const ORG_KEY_TOKEN = '<YOUR _ORGANIZATION_API_KEY >'; // Organization key is only required for creating new apps and other top-level endpoints
55+ const APP_KEY_TOKEN = '<YOUR _APP_KEY_TOKEN >';
56+ const USER_KEY_TOKEN = '<YOUR _USER_KEY_TOKEN >';
5757```
5858
5959### Configure authorization
6060``` php
6161$config = Configuration::getDefaultConfiguration()
62- ->setAppKeyToken(REST_KEY_TOKEN )
63- ->setUserKeyToken(ORG_KEY_TOKEN );
62+ ->setAppKeyToken(APP_KEY_TOKEN )
63+ ->setUserKeyToken(USER_KEY_TOKEN );
6464
6565$apiInstance = new DefaultApi(
6666 new GuzzleHttp\Client(),
@@ -416,41 +416,34 @@ All URIs are relative to *https://api.onesignal.com*
416416
417417Class | Method | HTTP request | Description
418418------------ | ------------- | ------------- | -------------
419- * DefaultApi* | [ ** beginLiveActivity** ] ( docs/Api/DefaultApi.md#beginliveactivity ) | ** POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
420419* DefaultApi* | [ ** cancelNotification** ] ( docs/Api/DefaultApi.md#cancelnotification ) | ** DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
420+ * DefaultApi* | [ ** createAlias** ] ( docs/Api/DefaultApi.md#createalias ) | ** PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
421+ * DefaultApi* | [ ** createAliasBySubscription** ] ( docs/Api/DefaultApi.md#createaliasbysubscription ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
421422* DefaultApi* | [ ** createApp** ] ( docs/Api/DefaultApi.md#createapp ) | ** POST** /apps | Create an app
422423* DefaultApi* | [ ** createNotification** ] ( docs/Api/DefaultApi.md#createnotification ) | ** POST** /notifications | Create notification
423- * DefaultApi* | [ ** createPlayer** ] ( docs/Api/DefaultApi.md#createplayer ) | ** POST** /players | Add a device
424- * DefaultApi* | [ ** createSegments** ] ( docs/Api/DefaultApi.md#createsegments ) | ** POST** /apps/{app_id}/segments | Create Segments
424+ * DefaultApi* | [ ** createSegment** ] ( docs/Api/DefaultApi.md#createsegment ) | ** POST** /apps/{app_id}/segments | Create Segment
425425* DefaultApi* | [ ** createSubscription** ] ( docs/Api/DefaultApi.md#createsubscription ) | ** POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
426426* DefaultApi* | [ ** createUser** ] ( docs/Api/DefaultApi.md#createuser ) | ** POST** /apps/{app_id}/users |
427427* DefaultApi* | [ ** deleteAlias** ] ( docs/Api/DefaultApi.md#deletealias ) | ** DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
428- * DefaultApi* | [ ** deletePlayer** ] ( docs/Api/DefaultApi.md#deleteplayer ) | ** DELETE** /players/{player_id} | Delete a user record
429- * DefaultApi* | [ ** deleteSegments** ] ( docs/Api/DefaultApi.md#deletesegments ) | ** DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
428+ * DefaultApi* | [ ** deleteSegment** ] ( docs/Api/DefaultApi.md#deletesegment ) | ** DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
430429* DefaultApi* | [ ** deleteSubscription** ] ( docs/Api/DefaultApi.md#deletesubscription ) | ** DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
431430* DefaultApi* | [ ** deleteUser** ] ( docs/Api/DefaultApi.md#deleteuser ) | ** DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
432- * DefaultApi* | [ ** endLiveActivity** ] ( docs/Api/DefaultApi.md#endliveactivity ) | ** DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
433431* DefaultApi* | [ ** exportEvents** ] ( docs/Api/DefaultApi.md#exportevents ) | ** POST** /notifications/{notification_id}/export_events?app_id= ; {app_id} | Export CSV of Events
434- * DefaultApi* | [ ** exportPlayers** ] ( docs/Api/DefaultApi.md#exportplayers ) | ** POST** /players/csv_export?app_id= ; {app_id} | Export CSV of Players
435- * DefaultApi* | [ ** fetchAliases** ] ( docs/Api/DefaultApi.md#fetchaliases ) | ** GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
436- * DefaultApi* | [ ** fetchUser** ] ( docs/Api/DefaultApi.md#fetchuser ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
437- * DefaultApi* | [ ** fetchUserIdentity** ] ( docs/Api/DefaultApi.md#fetchuseridentity ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
432+ * DefaultApi* | [ ** exportSubscriptions** ] ( docs/Api/DefaultApi.md#exportsubscriptions ) | ** POST** /players/csv_export?app_id= ; {app_id} | Export CSV of Subscriptions
433+ * DefaultApi* | [ ** getAliases** ] ( docs/Api/DefaultApi.md#getaliases ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
434+ * DefaultApi* | [ ** getAliasesBySubscription** ] ( docs/Api/DefaultApi.md#getaliasesbysubscription ) | ** GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
438435* DefaultApi* | [ ** getApp** ] ( docs/Api/DefaultApi.md#getapp ) | ** GET** /apps/{app_id} | View an app
439436* DefaultApi* | [ ** getApps** ] ( docs/Api/DefaultApi.md#getapps ) | ** GET** /apps | View apps
440- * DefaultApi* | [ ** getEligibleIams** ] ( docs/Api/DefaultApi.md#geteligibleiams ) | ** GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
441437* DefaultApi* | [ ** getNotification** ] ( docs/Api/DefaultApi.md#getnotification ) | ** GET** /notifications/{notification_id} | View notification
442438* DefaultApi* | [ ** getNotificationHistory** ] ( docs/Api/DefaultApi.md#getnotificationhistory ) | ** POST** /notifications/{notification_id}/history | Notification History
443439* DefaultApi* | [ ** getNotifications** ] ( docs/Api/DefaultApi.md#getnotifications ) | ** GET** /notifications | View notifications
444440* DefaultApi* | [ ** getOutcomes** ] ( docs/Api/DefaultApi.md#getoutcomes ) | ** GET** /apps/{app_id}/outcomes | View Outcomes
445- * DefaultApi* | [ ** getPlayer** ] ( docs/Api/DefaultApi.md#getplayer ) | ** GET** /players/{player_id} | View device
446- * DefaultApi* | [ ** getPlayers** ] ( docs/Api/DefaultApi.md#getplayers ) | ** GET** /players | View devices
447- * DefaultApi* | [ ** identifyUserByAlias** ] ( docs/Api/DefaultApi.md#identifyuserbyalias ) | ** PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
448- * DefaultApi* | [ ** identifyUserBySubscriptionId** ] ( docs/Api/DefaultApi.md#identifyuserbysubscriptionid ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
441+ * DefaultApi* | [ ** getSegments** ] ( docs/Api/DefaultApi.md#getsegments ) | ** GET** /apps/{app_id}/segments | Get Segments
442+ * DefaultApi* | [ ** getUser** ] ( docs/Api/DefaultApi.md#getuser ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
449443* DefaultApi* | [ ** transferSubscription** ] ( docs/Api/DefaultApi.md#transfersubscription ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
444+ * DefaultApi* | [ ** unsubscribeEmailWithToken** ] ( docs/Api/DefaultApi.md#unsubscribeemailwithtoken ) | ** POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
450445* DefaultApi* | [ ** updateApp** ] ( docs/Api/DefaultApi.md#updateapp ) | ** PUT** /apps/{app_id} | Update an app
451446* DefaultApi* | [ ** updateLiveActivity** ] ( docs/Api/DefaultApi.md#updateliveactivity ) | ** POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
452- * DefaultApi* | [ ** updatePlayer** ] ( docs/Api/DefaultApi.md#updateplayer ) | ** PUT** /players/{player_id} | Edit device
453- * DefaultApi* | [ ** updatePlayerTags** ] ( docs/Api/DefaultApi.md#updateplayertags ) | ** PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
454447* DefaultApi* | [ ** updateSubscription** ] ( docs/Api/DefaultApi.md#updatesubscription ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
455448* DefaultApi* | [ ** updateUser** ] ( docs/Api/DefaultApi.md#updateuser ) | ** PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
456449
@@ -460,37 +453,25 @@ Class | Method | HTTP request | Description
460453- [ BasicNotification] ( docs/Model/BasicNotification.md )
461454- [ BasicNotificationAllOf] ( docs/Model/BasicNotificationAllOf.md )
462455- [ BasicNotificationAllOfAndroidBackgroundLayout] ( docs/Model/BasicNotificationAllOfAndroidBackgroundLayout.md )
463- - [ BeginLiveActivityRequest] ( docs/Model/BeginLiveActivityRequest.md )
464456- [ Button] ( docs/Model/Button.md )
465- - [ CancelNotificationSuccessResponse] ( docs/Model/CancelNotificationSuccessResponse.md )
466457- [ CreateNotificationSuccessResponse] ( docs/Model/CreateNotificationSuccessResponse.md )
467- - [ CreatePlayerSuccessResponse] ( docs/Model/CreatePlayerSuccessResponse.md )
468458- [ CreateSegmentConflictResponse] ( docs/Model/CreateSegmentConflictResponse.md )
469459- [ CreateSegmentSuccessResponse] ( docs/Model/CreateSegmentSuccessResponse.md )
470- - [ CreateSubscriptionRequestBody] ( docs/Model/CreateSubscriptionRequestBody.md )
471460- [ CreateUserConflictResponse] ( docs/Model/CreateUserConflictResponse.md )
472461- [ CreateUserConflictResponseErrorsInner] ( docs/Model/CreateUserConflictResponseErrorsInner.md )
473462- [ CreateUserConflictResponseErrorsItemsMeta] ( docs/Model/CreateUserConflictResponseErrorsItemsMeta.md )
474- - [ DeletePlayerNotFoundResponse] ( docs/Model/DeletePlayerNotFoundResponse.md )
475- - [ DeletePlayerSuccessResponse] ( docs/Model/DeletePlayerSuccessResponse.md )
476- - [ DeleteSegmentNotFoundResponse] ( docs/Model/DeleteSegmentNotFoundResponse.md )
477- - [ DeleteSegmentSuccessResponse] ( docs/Model/DeleteSegmentSuccessResponse.md )
478463- [ DeliveryData] ( docs/Model/DeliveryData.md )
479464- [ ExportEventsSuccessResponse] ( docs/Model/ExportEventsSuccessResponse.md )
480- - [ ExportPlayersRequestBody ] ( docs/Model/ExportPlayersRequestBody .md )
481- - [ ExportPlayersSuccessResponse ] ( docs/Model/ExportPlayersSuccessResponse .md )
465+ - [ ExportSubscriptionsRequestBody ] ( docs/Model/ExportSubscriptionsRequestBody .md )
466+ - [ ExportSubscriptionsSuccessResponse ] ( docs/Model/ExportSubscriptionsSuccessResponse .md )
482467- [ Filter] ( docs/Model/Filter.md )
483- - [ FilterExpressions ] ( docs/Model/FilterExpressions .md )
468+ - [ FilterExpression ] ( docs/Model/FilterExpression .md )
484469- [ GenericError] ( docs/Model/GenericError.md )
485- - [ GenericErrorErrorsInner] ( docs/Model/GenericErrorErrorsInner.md )
486- - [ GetNotificationRequestBody] ( docs/Model/GetNotificationRequestBody.md )
487- - [ InlineResponse200] ( docs/Model/InlineResponse200.md )
488- - [ InlineResponse2003] ( docs/Model/InlineResponse2003.md )
489- - [ InlineResponse201] ( docs/Model/InlineResponse201.md )
490- - [ InlineResponse202] ( docs/Model/InlineResponse202.md )
491- - [ InvalidIdentifierError] ( docs/Model/InvalidIdentifierError.md )
470+ - [ GenericSuccessBoolResponse] ( docs/Model/GenericSuccessBoolResponse.md )
471+ - [ GetNotificationHistoryRequestBody] ( docs/Model/GetNotificationHistoryRequestBody.md )
472+ - [ GetSegmentsSuccessResponse] ( docs/Model/GetSegmentsSuccessResponse.md )
473+ - [ LanguageStringMap] ( docs/Model/LanguageStringMap.md )
492474- [ Notification] ( docs/Model/Notification.md )
493- - [ Notification200Errors] ( docs/Model/Notification200Errors.md )
494475- [ NotificationAllOf] ( docs/Model/NotificationAllOf.md )
495476- [ NotificationHistorySuccessResponse] ( docs/Model/NotificationHistorySuccessResponse.md )
496477- [ NotificationSlice] ( docs/Model/NotificationSlice.md )
@@ -503,30 +484,24 @@ Class | Method | HTTP request | Description
503484- [ PlatformDeliveryData] ( docs/Model/PlatformDeliveryData.md )
504485- [ PlatformDeliveryDataEmailAllOf] ( docs/Model/PlatformDeliveryDataEmailAllOf.md )
505486- [ PlatformDeliveryDataSmsAllOf] ( docs/Model/PlatformDeliveryDataSmsAllOf.md )
506- - [ Player] ( docs/Model/Player.md )
507- - [ PlayerNotificationTarget] ( docs/Model/PlayerNotificationTarget.md )
508- - [ PlayerNotificationTargetIncludeAliases] ( docs/Model/PlayerNotificationTargetIncludeAliases.md )
509- - [ PlayerSlice] ( docs/Model/PlayerSlice.md )
487+ - [ PropertiesBody] ( docs/Model/PropertiesBody.md )
510488- [ PropertiesDeltas] ( docs/Model/PropertiesDeltas.md )
511489- [ PropertiesObject] ( docs/Model/PropertiesObject.md )
512490- [ Purchase] ( docs/Model/Purchase.md )
513- - [ RateLimiterError ] ( docs/Model/RateLimiterError .md )
491+ - [ RateLimitError ] ( docs/Model/RateLimitError .md )
514492- [ Segment] ( docs/Model/Segment.md )
493+ - [ SegmentData] ( docs/Model/SegmentData.md )
515494- [ SegmentNotificationTarget] ( docs/Model/SegmentNotificationTarget.md )
516- - [ StringMap] ( docs/Model/StringMap.md )
517- - [ SubscriptionObject] ( docs/Model/SubscriptionObject.md )
495+ - [ Subscription] ( docs/Model/Subscription.md )
496+ - [ SubscriptionBody] ( docs/Model/SubscriptionBody.md )
497+ - [ SubscriptionNotificationTarget] ( docs/Model/SubscriptionNotificationTarget.md )
518498- [ TransferSubscriptionRequestBody] ( docs/Model/TransferSubscriptionRequestBody.md )
519499- [ UpdateLiveActivityRequest] ( docs/Model/UpdateLiveActivityRequest.md )
520500- [ UpdateLiveActivitySuccessResponse] ( docs/Model/UpdateLiveActivitySuccessResponse.md )
521- - [ UpdatePlayerSuccessResponse] ( docs/Model/UpdatePlayerSuccessResponse.md )
522- - [ UpdatePlayerTagsRequestBody] ( docs/Model/UpdatePlayerTagsRequestBody.md )
523- - [ UpdatePlayerTagsSuccessResponse] ( docs/Model/UpdatePlayerTagsSuccessResponse.md )
524- - [ UpdateSubscriptionRequestBody] ( docs/Model/UpdateSubscriptionRequestBody.md )
525501- [ UpdateUserRequest] ( docs/Model/UpdateUserRequest.md )
526502- [ User] ( docs/Model/User.md )
527- - [ UserIdentityRequestBody] ( docs/Model/UserIdentityRequestBody.md )
528- - [ UserIdentityResponse] ( docs/Model/UserIdentityResponse.md )
529- - [ UserSubscriptionOptions] ( docs/Model/UserSubscriptionOptions.md )
503+ - [ UserIdentityBody] ( docs/Model/UserIdentityBody.md )
504+ - [ WebButton] ( docs/Model/WebButton.md )
530505
531506## Authorization
532507All the OneSignal endpoints require either an * app_key* or * user_key* tokens for authorization. It is recommended to
@@ -536,12 +511,12 @@ requires app_key and which user_key. You can get the value of these keys from yo
536511
537512
538513
539- ### app_key
514+ ### rest_api_key
540515
541516- ** Type** : Bearer authentication
542517
543518
544- ### user_key
519+ ### user_auth_key
545520
546521- ** Type** : Bearer authentication
547522
@@ -551,5 +526,5 @@ requires app_key and which user_key. You can get the value of these keys from yo
551526devrel@onesignal.com
552527
553528
554- - API version: ` 1.4.0 `
555- - Package version: ` 2.2.0 `
529+ - API version: ` 5.0.1 `
530+ - Package version: ` 5.0.0-beta1 `
0 commit comments