Appearance
Ad Account Adspixels
Updated: Apr 16, 2024
Reading
ad account to ads pixels edge
Example
Select language
HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDKcURL
GET /v25.0/<PIXEL_ID>/?fields=code HTTP/1.1
Host: graph.facebook.comTry it in Graph API Explorer
If you want to learn how to use the Graph API, read our Using Graph API guide
Parameters
This endpoint doesn't have any parameters.
Fields
Reading from this edge will return a JSON formatted result:
{
"data": [],
"paging": {},
"summary": {}
}data
A list of AdsPixel nodes.
paging
For more details about pagination, see the Graph API guide.
summary
Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=__type__).
| Field | Description |
|---|---|
total_count int32 | Total number of objects on this edge default |
Error Codes
| Error Code | Description |
|---|---|
| 200 | Permissions error |
| 190 | Invalid OAuth 2.0 Access Token |
| 80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to /docs/graph-api/overview/rate-limiting#ads-management. |
| 100 | Invalid parameter |
Creating
/act_{ad_account_id}/adspixels
You can make a POST request to adspixels edge from the following paths:
When posting to this edge, an AdsPixel will be created.
Example
Select language
HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDKcURL
POST /v25.0/act_<AD_ACCOUNT_ID>/adspixels HTTP/1.1
Host: graph.facebook.com
name=My+WCA+PixelTry it in Graph API Explorer
If you want to learn how to use the Graph API, read our Using Graph API guide
Parameters
| Parameter | Description |
|---|---|
name string | Name of the pixel |
Return Type
This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}Error Codes
| Error Code | Description |
|---|---|
| 6202 | More than one pixel exist for this account |
| 6200 | A pixel already exists for this account |
| 100 | Invalid parameter |
| 200 | Permissions error |
Updating
You can't perform this operation on this endpoint.
Deleting
You can't perform this operation on this endpoint.