Method: accounts.adSources.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำขอ HTTP
GET https://admob.googleapis.com/v1beta/{parent=accounts/*}/adSources
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ หลักที่เป็นเจ้าของคอลเล็กชันแหล่งที่มาของโฆษณา รูปแบบ: บัญชี/{publisherId}
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
pageSize |
integer
จำนวนสูงสุดของแหล่งที่มาของโฆษณาที่จะแสดง หากไม่ระบุหรือ 0 ระบบจะแสดงผลแหล่งที่มาของโฆษณาไม่เกิน 10,000 แห่ง ค่าสูงสุดคือ 20,000 ค่าที่มากกว่า 10,000 จะถูกเปลี่ยนเป็น 20,000
|
pageToken |
string
โทเค็นของหน้าเว็บที่ได้รับจากการโทร adSources.list ก่อนหน้า ระบุพารามิเตอร์นี้เพื่อเรียกข้อมูลหน้าถัดไป
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
การตอบกลับสำหรับ ListAdSourcesRequest
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"adSources": [
{
object (AdSource )
}
],
"nextPageToken": string
} |
ช่อง |
adSources[] |
object (AdSource )
แหล่งที่มาของโฆษณา
|
nextPageToken |
string
ใช้เพื่อตั้งค่า pageToken ใน ListAdSourcesRequest เพื่อดึงข้อมูลหน้าถัดไป หากเว้นช่องนี้ไว้ จะไม่มีหน้าลำดับต่อมา
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth รายการใดรายการหนึ่งต่อไปนี้
https://www.googleapis.com/auth/admob.readonly
https://www.googleapis.com/auth/admob.report
สำหรับข้อมูลเพิ่มเติม โปรดดูที่ภาพรวมของ OAuth 2.0
AdSource
คำจำกัดความของแหล่งที่มาของโฆษณาสื่อกลาง
การแสดง JSON |
{
"name": string,
"adSourceId": string,
"title": string
} |
ช่อง |
name |
string
ชื่อทรัพยากรของแหล่งที่มาของโฆษณานี้ รูปแบบคือ: accounts/{publisherId}/adSources/{adSourceId}
|
adSourceId |
string
รหัสของแหล่งที่มาของโฆษณานี้
|
title |
string
ชื่อที่แสดงของแหล่งที่มาของโฆษณานี้
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-21 UTC
[null,null,["อัปเดตล่าสุด 2025-08-21 UTC"],[[["\u003cp\u003eRetrieves a list of ad sources associated with a specific AdMob account.\u003c/p\u003e\n"],["\u003cp\u003eAllows pagination to retrieve large lists of ad sources using \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach ad source is identified by a unique \u003ccode\u003eadSourceId\u003c/code\u003e and has a display \u003ccode\u003etitle\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific authorization scopes for access.\u003c/p\u003e\n"]]],["This document details how to list ad sources using the AdMob API. To retrieve ad sources, send a `GET` request to `https://admob.googleapis.com/v1beta/{parent=accounts/*}/adSources`, specifying the account ID in the `parent` path parameter. Optional query parameters include `pageSize` (maximum ad sources returned) and `pageToken` (for pagination). The request body must be empty. The response includes a list of `adSources` with their `name`, `adSourceId`, and `title` and a `nextPageToken` for further pages.\n"],null,["# Method: accounts.adSources.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListAdSourcesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [AdSource](#AdSource)\n - [JSON representation](#AdSource.SCHEMA_REPRESENTATION)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nList the ad sources.\n\n### HTTP request\n\n`GET https://admob.googleapis.com/v1beta/{parent=accounts/*}/adSources`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent which owns this collection of ad sources. Format: accounts/{publisherId} |\n\n### Query parameters\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of ad sources to return. If unspecified or 0, at most 10,000 ad sources will be returned. The maximum value is 20,000; values above 10,000 will be coerced to 20,000. |\n| `pageToken` | `string` A page token, received from a previous `adSources.list` call. Provide this to retrieve the subsequent page. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse for the ListAdSourcesRequest.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"adSources\": [ { object (/admob/api/reference/rest/v1beta/accounts.adSources/list#AdSource) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `adSources[]` | `object (`[AdSource](/admob/api/reference/rest/v1beta/accounts.adSources/list#AdSource)`)` The ad sources. |\n| `nextPageToken` | `string` Used to set the `pageToken` in the `ListAdSourcesRequest` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admob.readonly`\n- `\n https://www.googleapis.com/auth/admob.report`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nAdSource\n--------\n\nDefinition of a mediation ad source.\n\n| JSON representation |\n|-------------------------------------------------------------------|\n| ``` { \"name\": string, \"adSourceId\": string, \"title\": string } ``` |\n\n| Fields ||\n|--------------|----------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of this ad source. Format is: accounts/{publisherId}/adSources/{adSourceId} |\n| `adSourceId` | `string` ID of this ad source. |\n| `title` | `string` Display name of this ad source. |"]]