rocket
Meet
Merchant API
- the official successor to Content API for Shopping.
update
Get the latest
on new Merchant API features, bug fixes, and updates.
add_alert
Note: Content API for Shopping will be sunset on August 18, 2026.
Method: accounts.authinfo
Stay organized with collections
Save and categorize content based on your preferences.
Returns information about the authenticated user.
HTTP request
GET https://shoppingcontent.googleapis.com/content/v2.1/accounts/authinfo
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
JSON representation |
{
"accountIdentifiers": [
{
object (AccountIdentifier )
}
],
"kind": string
} |
Fields |
accountIdentifiers[] |
object (AccountIdentifier )
The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined
- For an aggregator: only the aggregator ID is defined
- For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined.
|
kind |
string
Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse ".
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
AccountIdentifier
JSON representation |
{
"aggregatorId": string,
"merchantId": string
} |
Fields |
aggregatorId |
string
The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).
|
merchantId |
string
The merchant account ID, set for individual accounts and subaccounts.
|
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 2025-02-25 UTC.
[null,null,["Last updated 2025-02-25 UTC."],[[["\u003cp\u003eThis endpoint returns information about the authenticated user, such as account identifiers and kind.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes account identifiers, which can vary depending on the type of account (individual, aggregator, or subaccount).\u003c/p\u003e\n"],["\u003cp\u003eAccountIdentifier object provides details about the aggregator ID and merchant ID associated with the user.\u003c/p\u003e\n"]]],["This document details how to retrieve information about an authenticated user. A `GET` request to `https://shoppingcontent.googleapis.com/content/v2.1/accounts/authinfo` is used, with an empty request body. A successful response includes `accountIdentifiers`, an array of `AccountIdentifier` objects containing `aggregatorId` and `merchantId`, and the string `content#accountsAuthInfoResponse` as the `kind`. Authentication requires the `https://www.googleapis.com/auth/content` OAuth scope.\n"],null,["# Method: accounts.authinfo\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.AccountsAuthInfoResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [AccountIdentifier](#AccountIdentifier)\n - [JSON representation](#AccountIdentifier.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nReturns information about the authenticated user.\n\n### HTTP request\n\n`GET https://shoppingcontent.googleapis.com/content/v2.1/accounts/authinfo`\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"accountIdentifiers\": [ { object (/shopping-content/reference/rest/v2.1/accounts/authinfo#AccountIdentifier) } ], \"kind\": string } ``` |\n\n| Fields ||\n|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `accountIdentifiers[]` | `object (`[AccountIdentifier](/shopping-content/reference/rest/v2.1/accounts/authinfo#AccountIdentifier)`)` The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. \u003cbr /\u003e |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string \"`content#accountsAuthInfoResponse`\". |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2).\n\nAccountIdentifier\n-----------------\n\n| JSON representation |\n|----------------------------------------------------------|\n| ``` { \"aggregatorId\": string, \"merchantId\": string } ``` |\n\n| Fields ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------|\n| `aggregatorId` | `string` The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). |\n| `merchantId` | `string` The merchant account ID, set for individual accounts and subaccounts. |"]]