List the token's ad accounts
The ad accounts the stored token can see. Also the way to test a token: an invalid one answers 409 credential_invalid, one without access answers 409 insufficient_permission, each with the fix in message.
curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/ad-tagging/meta/ad-accounts?location_id=example_string&credential_name=John%20Doe" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/ad-tagging/meta/ad-accounts?location_id=example_string&credential_name=John%20Doe"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/ad-tagging/meta/ad-accounts?location_id=example_string&credential_name=John%20Doe", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://mythic-analytics.gulp.workers.dev/client/v1/ad-tagging/meta/ad-accounts?location_id=example_string&credential_name=John%20Doe", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/ad-tagging/meta/ad-accounts?location_id=example_string&credential_name=John%20Doe')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": [
{
"id": "act_1234567890",
"account_id": "1234567890",
"name": "John Doe",
"account_status": 10,
"currency": "example_string"
}
],
"truncated": true
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
{
"error": "Error",
"message": "`invalid_request` (Meta's own message), `upstream_error` or `upstream_malformed`.",
"code": 502
}
{
"error": "Error",
"message": "`upstream_timeout`. A Meta request timed out or the network request failed.",
"code": 504
}
/client/v1/ad-tagging/meta/ad-accounts
Target server for requests. Edit to use your own host.
Agency key (ak_) or location secret key (sk_, reads of the config and runs only). Scoped keys (mcp_) are accepted too and need ad_tagging:read or ad_tagging:write. See Using an mcp_ key over HTTP.
ak_) or location secret key (sk_, reads of the config and runs only). Scoped keys (mcp_) are accepted too and need ad_tagging:read or ad_tagging:write. See Using an mcp_ key over HTTP.Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.
Named meta_ads credential. Default is the config's, else default.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) or location secret key (sk_, reads of the config and runs only). Scoped keys (mcp_) are accepted too and need ad_tagging:read or ad_tagging:write. See Using an mcp_ key over HTTP.
Query Parameters
Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.
Named meta_ads credential. Default is the config's, else default.