يجب أن يتعامل تطبيقك صراحةً مع أنواع أحداث دورة الحياة هذه ويتجاهل
أنواع الأحداث الجديدة التي قد تظهر في المستقبل.
يتم تنظيم أحداث دورة الحياة من "Google Workspace Events API" وفقًا
لمواصفات CloudEvents. لمزيد من المعلومات، يُرجى الاطّلاع على بنية
أحداث Google Workspace.
أحداث التعليق
عند حدوث خطأ في اشتراك Google Workspace، تعلّق واجهة برمجة التطبيقات Google Workspace Events API الاشتراك وتمنعه منتلقّي الأحداث. يجب حلّ أي أخطاء في الاشتراك قبل
إعادة تفعيله.
لإعلامك بعملية تعليق، تُرسِل Google Workspace Events API حدثًا متعلقًا بالحالة مع نوع الحدث
google.workspace.events.subscription.v1.suspended.
بعد انتهاء صلاحية اشتراك، تحذف واجهة برمجة التطبيقات
Google Workspace Events API الاشتراك نهائيًا، ولا يمكنك تجديده أو
إعادة تفعيله.
لإعلامك باشتراك سينقضي قريبًا، تُرسِل "واجهة برمجة تطبيقات أحداث Google Workspace"
أحداث دورة الحياة قبل 12 ساعة وقبل ساعة واحدة من وقت انتهاء الصلاحية.
يكون نوع الحدث لأحداث دورة النشاط هو
google.workspace.events.subscription.v1.expirationReminder.
عند تلقّي حدث تذكير بانتهاء الصلاحية، يمكنك استخدام الأسلوب
subscriptions.update() لتعديل وقت انتهاء الصلاحية. لمعرفة التفاصيل، يُرجى الاطّلاع على مقالة تعديل اشتراك Google Workspace أو تجديده.
يعرض ما يلي حدث CloudEvent لحدث دورة حياة بشأن اشتراك قيد الانتهاء في
Google Workspace:
تُرسِل لك Google Workspace Events API حدث دورة حياة عند انتهاء صلاحية الاشتراك. نوع الحدث لحدث رحلة المستخدِم هذا هو
google.workspace.events.subscription.v1.expired.
تحذف Google Workspace Events API الاشتراكات المنتهية الصلاحية نهائيًا.
إذا انتهت صلاحية اشتراكك، يمكنك استخدام طريقة
subscriptions.create() لإنشاء اشتراك آخر. لمعرفة التفاصيل، يُرجى الاطّلاع على مقالة إنشاء اشتراك في Google Workspace.
يعرض ما يلي حدثًا في CloudEvent لحدث دورة حياة بشأن اشتراك
Google Workspace منتهي الصلاحية:
تاريخ التعديل الأخير: 2025-05-08 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-05-08 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis page describes Google Workspace subscription lifecycle events, including suspension, expiration reminders, and expiration, which are used to maintain active subscriptions.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Workspace Events API sends lifecycle events as structured CloudEvents to notify you about subscription suspensions, upcoming expirations, and actual expirations.\u003c/p\u003e\n"],["\u003cp\u003eUpon receiving suspension events, you can investigate the cause, resolve errors, and reactivate the subscription; expiration reminder events allow you to update the subscription's expiration time before it's deleted.\u003c/p\u003e\n"],["\u003cp\u003eWhen a Google Workspace subscription expires, you receive an expiration event and need to create a new subscription as the expired one is permanently deleted.\u003c/p\u003e\n"]]],["The Google Workspace Events API sends lifecycle events to manage subscriptions, including suspension, expiration reminders, and expiration notifications. Upon suspension, indicated by `google.workspace.events.subscription.v1.suspended`, errors must be resolved to reactivate. Expiration reminders, sent as `google.workspace.events.subscription.v1.expirationReminder`, allow for subscription renewal via `subscriptions.update()`. When subscriptions expire, indicated by `google.workspace.events.subscription.v1.expired`, they are permanently deleted, requiring a new subscription via `subscriptions.create()`. All events adhere to the CloudEvents specification.\n"],null,["# Receive and respond to lifecycle events for Google Workspace subscriptions\n\nThis page explains the lifecycle events that you receive for Google Workspace\nsubscriptions, and how you can use the events to maintain an active\nsubscription.\n\nThe Google Workspace Events API sends the following types of lifecycle events:\n\n- [Suspension events](#suspension) that notify you when your subscription is suspended due to an error.\n- [Expiration reminder events](#expiration-reminder) that notify you that your subscription is expiring soon.\n- [Expired events](#expired) that notify you when your subscription expires.\n\nYour app should explicitly handle these lifecycle event types and ignore\nnew event types that might appear in the future.\n\nLifecycle events from the Google Workspace Events API are structured according to\nthe CloudEvents specification. To learn more, see [Structure of\nGoogle Workspace events](/workspace/events/guides#structure-events).\n| **Note:** If your subscription encounters an error related to its notification endpoint, you might not receive lifecycle events. To learn about and address endpoint errors, you can monitor the endpoint itself. To monitor endpoints that are Google Cloud Pub/Sub topics, see [Handle\n| message failures](https://cloud.google.com/pubsub/docs/handling-failures).\n\nSuspension events\n-----------------\n\nWhen an error occurs for a Google Workspace subscription, the\nGoogle Workspace Events API suspends the subscription and prevents it from\nreceiving events. You must resolve any errors with the subscription before\nreactivating it.\n\nTo notify you of a suspension, the Google Workspace Events API sends a\nlifecycle event with the event type\n`google.workspace.events.subscription.v1.suspended`.\n\nAfter you receive a suspension event, you can learn about the reason for the\nsuspension, resolve any errors, and reactivate the subscription. For details,\nsee [Resolve errors and reactivate a Google Workspace\nsubscription](/workspace/events/guides/reactivate-subscription).\n\nThe following shows a CloudEvent for a lifecycle event about a\nGoogle Workspace subscription that was suspended due to the error\n`ENDPOINT_PERMISSION_DENIED`: \n\n```\n{\n \"id\": \"EVENT_UUID\",\n \"source\": \"//workspaceevents.googleapis.com/subscriptions/SUBSCRIPTION_ID\",\n \"subject\": \"//workspaceevents.googleapis.com/subscriptions/SUBSCRIPTION_ID\",\n \"type\": \"google.workspace.events.subscription.v1.suspended\",\n \"time\": \"2023-06-08T06:50:43.641299Z\",\n \"spec_version\": '1.0',\n \"datacontenttype\": \"application/json\",\n \"data\": {\n \"subscription\":{\n \"name\": \"subscriptions/SUBSCRIPTION_ID\",\n \"suspension_reason\": \"ENDPOINT_PERMISSION_DENIED\",\n ...\n }\n }\n}\n```\n\nExpiration reminder events\n--------------------------\n\nAfter a subscription expires, the\nGoogle Workspace Events API permanently deletes it, and you can't renew or\nreactivate it.\n\nTo notify you of an expiring subscription, the Google Workspace Events API\nsends lifecycle events 12 hours and one hour before the expiration time. The\nevent type for lifecycle events is\n`google.workspace.events.subscription.v1.expirationReminder`.\n\nWhen you receive an expiration reminder event, you can use the\n`subscriptions.update()` method to update the expire time. For details, see\n[Update or renew a Google Workspace\nsubscription](/workspace/events/guides/update-subscription).\n\nThe following shows a CloudEvent for a lifecycle event about an expiring\nGoogle Workspace subscription: \n\n```\n{\n \"id\": \"EVENT_UUID\",\n \"source\": \"//workspaceevents.googleapis.com/subscriptions/SUBSCRIPTION_ID\",\n \"subject\": \"//workspaceevents.googleapis.com/subscriptions/SUBSCRIPTION_ID\",\n \"type\": \"google.workspace.events.subscription.v1.expirationReminder\",\n \"time\": \"2023-06-08T06:50:43.641299Z\",\n \"spec_version\": '1.0',\n \"datacontenttype\": \"application/json\",\n \"data\": {\n \"subscription\":{\n \"name\": \"subscriptions/SUBSCRIPTION_ID\",\n \"expire_time\": \"2023-06-08T18:50:43.641299Z\",\n ...\n }\n }\n}\n```\n\nSubscription expired events\n---------------------------\n\nThe Google Workspace Events API sends you a lifecycle event when\nthe subcription expires. The event type for this lifecycle event is\n`google.workspace.events.subscription.v1.expired`.\n\nThe Google Workspace Events API permanently deletes expired subscriptions.\nIf your subscription expires, you can use the\n`subscriptions.create()` method to create another subscription. For details, see\n[Create a Google Workspace\nsubscription](/workspace/events/guides/create-subscription).\n\nThe following shows a CloudEvent for a lifecycle event about an expired\nGoogle Workspace subscription: \n\n```\n{\n \"id\": \"EVENT_UUID\",\n \"source\": \"//workspaceevents.googleapis.com/subscriptions/SUBSCRIPTION_ID\",\n \"subject\": \"//workspaceevents.googleapis.com/subscriptions/SUBSCRIPTION_ID\",\n \"type\": \"google.workspace.events.subscription.v1.expired\",\n \"time\": \"2023-06-08T07:00:00.000000Z\",\n \"spec_version\": '1.0',\n \"datacontenttype\": \"application/json\",\n \"data\": {\n \"subscription\":{\n \"name\": \"subscriptions/SUBSCRIPTION_ID\",\n \"expire_time\": \"2023-06-08T07:00:00.000000Z\",\n ...\n }\n }\n}\n```\n\nRelated topics\n--------------\n\n- [Structure of Google Workspace events](/workspace/events/guides#structure)\n- [Resolve errors and reactivate a subscription](/workspace/events/guides/reactivate-subscription)\n- [Update or renew a subscription](/workspace/events/guides/update-subscription)"]]