AI-generated Key Takeaways
-
This page helps app developers resolve issues with the Data Portability API.
-
Incremental authentication is not allowed for Data Portability API scopes if
include_granted_scopes=trueand the user has already granted some scopes; removeinclude_granted_scopesor set it to false and only request ungranted scopes to fix. -
Renewal is only available for projects with a Production publishing status; change the project's status to Production to enable renewal.
-
The "requested resources are not authorized" error occurs when requesting resource groups whose scopes are not granted by the OAuth token; track granted scopes per token and potentially store multiple tokens for a user to resolve.
-
A 400 error can occur when requesting too many scopes at once due to URL length limitations; split requests into smaller batches to resolve.
This page shows you app developers how to resolve issues with the Data Portability API.
Incremental auth isn't allowed for this scope
The following issue occurs when you request an OAuth flow for Data Portability API
scopes with include_granted_scopes=true and the end user has already granted
some scopes to the project, or the user has already granted some of the
requested scopes.
Incremental auth is not allowed for the requested scopes. If you are a developer of APP_NAME, see error details. Error 400: invalid_request
To resolve this issue remove include_granted_scopes from your request or set
it to false and only request scopes that the user hasn't granted. For details,
see Previously granted scopes.
No renewal option
The following issue occurs when an end user grants access to a project with a Testing publishing status. Renewal is only available to projects with a Production publishing status. The end user won't see a renewal option on their myaccount connections page.
To resolve this issue change the project's publishing status to Production. For details, see Set up an OAuth workflow.
The requested resources are not authorized
The following issue occurs when the you make a request to the Data Portability API to initiate a job for resource groups whose scopes are not granted in the attached OAuth access token.
HttpError 403 when requesting https://dataportability.googleapis.com/v1/portabilityArchive:initiate?alt=json returned "The requested resources are not authorized by the OAuth token.". Details: "[{'@type': 'type.googleapis.com/google.rpc.DebugInfo', 'detail': '[ORIGINAL ERROR] generic::permission_denied: com.google.dataliberation.portability.boq.thirdparty.utils.PortabilityApiException: The requested resources are not authorized by the OAuth token. Code: PERMISSION_DENIED [google.rpc.error_details_ext] { message: "The requested resources are not authorized by the OAuth token." }'}]"
To resolve this issue, keep track of which scopes are granted by which OAuth tokens. You may need to store multiple different tokens for the same user if they granted different scopes through multiple flows. Also note that a user might have granted only a subset of the scopes requested in an OAuth flow. For examples, see the Python quickstart.
400 error at https://takeout.google.com/dpinfo when requesting many scopes
https://takeout.google.com/dpinfo throws a 400 error when the URL length grows beyond what is supported due to the number of scopes in your request. To resolve, split your requests for scopes into multiple smaller batches.