Error Scenarios
Stay organized with collections
Save and categorize content based on your preferences.
The following sections highlight the most common scenarios in which Mobile Data
Plan Sharing API returns an error to the caller. If the errors persist, please
reach out to mdp-support@google.com
for support and share the URL being called
along with the request body.
HTTP 404 Not Found
The most common reason for an HTTP 404 error is when GTAF is unable to find the
GCM token of the user for whom a notification should be sent. This happens when
the device either did not get a chance or failed to register the CPID and the
associated GCM token with GTAF. This could also happen if the device is
registered with pre-prod instance of GTAF and the notification is being sent to
prod instance of GTAF.
To diagnose this error:
- ensure that the MDP UI is successfully loading on the device.
- ensure that path parameters and the query parameters in the call are URL
encoded.
- try both pre-prod (preprod-mobiledataplansharing.googleapis.com) and prod
endpoints (mobiledataplansharing.googleapis.com).
HTTP 400 Bad Request
This error happens when the body of the request sent to GTAF is invalid. The
most common scenarios for this are:
- updateTime in PlanStatus
is not
provided or is in the future.
- expireTime in PlanStatus
is not
provided or is in the past.
- userKey query parameter is missing.
- all the fields required for constructing a notification are not present.
Please see notification guidelines
for details on how to
trigger notifications.
HTTP 409 Conflict
GTAF returns this error to the caller if the PlanStatus
in cache is
more recent (i.e., the updateTime is more recent) than the one being sent in the
request. Please check your logs to see if a PlanStatus
has been
pushed for this user.
HTTP 403 Forbidden
GTAF returns this error if the caller is not authorized to call Mobile Data Plan
Sharing API for the particular ASN being used in the URL. To diagnose this
error:
1. verify that the API
is enabled in Google cloud console API
Library
.
1. the service account being used for the call has been added to the ISP
portal
of the carrier.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-03 UTC."],[[["\u003cp\u003eThis page outlines common errors when using the Mobile Data Plan Sharing API, such as HTTP 404, 400, 409, and 403 errors, and provides troubleshooting steps.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 404 errors typically occur when GTAF cannot find the user's GCM token, potentially due to device registration issues or using the wrong GTAF instance.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 400 errors indicate an invalid request body, often caused by incorrect timestamps or missing parameters in the PlanStatus.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 409 errors suggest that a more recent PlanStatus already exists in the cache, requiring a review of previous updates.\u003c/p\u003e\n"],["\u003cp\u003eHTTP 403 errors arise from authorization issues, necessitating verification of API enablement and service account permissions within the carrier's ISP portal.\u003c/p\u003e\n"]]],["The Mobile Data Plan Sharing API returns errors in specific scenarios. A 404 error indicates a missing GCM token; solutions include ensuring the UI loads, URL encoding parameters, and checking both endpoints. A 400 error signals an invalid request body, often due to incorrect `updateTime`, `expireTime`, missing `userKey`, or incomplete notification details. A 409 error arises from sending outdated `PlanStatus`, and a 403 error occurs if authorization is lacking; checking API enablement and service account status is advised. For persistent errors, contact mdp-support@google.com.\n"],null,["# Error Scenarios\n\nThe following sections highlight the most common scenarios in which Mobile Data\nPlan Sharing API returns an error to the caller. If the errors persist, please\nreach out to [mdp-support@google.com](mailto:mdp-support@google.com) for support and share the URL being called\nalong with the request body.\n\nHTTP 404 Not Found\n------------------\n\nThe most common reason for an HTTP 404 error is when GTAF is unable to find the\nGCM token of the user for whom a notification should be sent. This happens when\nthe device either did not get a chance or failed to register the CPID and the\nassociated GCM token with GTAF. This could also happen if the device is\nregistered with pre-prod instance of GTAF and the notification is being sent to\nprod instance of GTAF.\n\nTo diagnose this error:\n\n1. ensure that the MDP UI is successfully loading on the device.\n2. ensure that path parameters and the query parameters in the call are URL encoded.\n3. try both pre-prod (preprod-mobiledataplansharing.googleapis.com) and prod endpoints (mobiledataplansharing.googleapis.com).\n\nHTTP 400 Bad Request\n--------------------\n\nThis error happens when the body of the request sent to GTAF is invalid. The\nmost common scenarios for this are:\n\n1. updateTime in [PlanStatus](/mobile-data-plan/v6_1/reference/rest/v1/operators.planStatuses#PlanStatus) is not provided or is in the future.\n2. expireTime in [PlanStatus](/mobile-data-plan/v6_1/reference/rest/v1/operators.planStatuses#PlanStatus) is not provided or is in the past.\n3. userKey query parameter is missing.\n4. all the fields required for constructing a notification are not present. Please see [notification guidelines](/mobile-data-plan/v6_1/notifications) for details on how to trigger notifications.\n\nHTTP 409 Conflict\n-----------------\n\nGTAF returns this error to the caller if the\n[PlanStatus](/mobile-data-plan/v6_1/reference/rest/v1/operators.planStatuses#PlanStatus) in cache is\nmore recent (i.e., the updateTime is more recent) than the one being sent in the\nrequest. Please check your logs to see if a\n[PlanStatus](/mobile-data-plan/v6_1/reference/rest/v1/operators.planStatuses#PlanStatus) has been\npushed for this user.\n\nHTTP 403 Forbidden\n------------------\n\nGTAF returns this error if the caller is not authorized to call Mobile Data Plan\nSharing API for the particular ASN being used in the URL. To diagnose this\nerror:\n1. verify that the\n[API](https://console.cloud.google.com/apis/library/mobiledataplansharing.googleapis.com/)\nis enabled in Google cloud console [API\nLibrary](https://console.developers.google.com/apis/library).\n1. the service account being used for the call has been added to the [ISP\nportal](https://isp.google.com) of the carrier."]]