- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Examples
- Try it!
Registers a new subscriber endpoint to receive notifications. A subscriber represents an application or service that wishes to receive data change notifications for users who have granted consent.
Endpoint Verification: For a subscriber to be successfully created, the provided endpointUri must be a valid HTTPS endpoint and must pass an automated verification check. The backend will send two HTTP POST requests to the endpointUri:
Verification with Authorization:
- Headers: Includes
Content-Type: application/jsonandAuthorization(with the exact value fromCreateSubscriberPayload.endpoint_authorization.secret). - Body:
{"type": "verification"} - Expected Response: HTTP
201 Created.
- Headers: Includes
Verification without Authorization:
- Headers: Includes
Content-Type: application/json. TheAuthorizationheader is OMITTED. - Body:
{"type": "verification"} - Expected Response: HTTP
401 Unauthorizedor403 Forbidden.
- Headers: Includes
Both tests must pass for the subscriber creation to succeed. If verification fails, the operation will not be completed and an error will be returned. This process ensures the endpoint is reachable and correctly validates the Authorization header.
HTTP request
POST https://health.googleapis.com/v4/{parent=projects/*}/subscribers
The URL uses gRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the service error catalog
Path parameters
| Parameters | |
|---|---|
parent |
Required. The parent resource where this subscriber will be created. Format: projects/{project} Example: projects/my-project-123 It takes the form |
Query parameters
| Parameters | |
|---|---|
subscriberId |
Optional. The ID to use for the subscriber, which will become the final component of the subscriber's resource name. This value should be 4-36 characters, and valid characters are /a-z/. |
Request body
The request body contains an instance of CreateSubscriberPayload.
Response body
If successful, the response body contains a newly created instance of Operation.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
health.subscribers.create
For more information, see the IAM documentation.