{
 "schema": "aiblocks-page/1",
 "id": "graph-api-common-errors-implementation-planner",
 "type": "skill",
 "name": "Meta API access troubleshooter",
 "summary": "Find why your Meta Graph API calls fail. Paste redacted errors and get the likely cause, a fix for each and a safe retry plan.",
 "headline": "Meta API access troubleshooter",
 "subhead": "Paste the redacted error from each failing Meta API call, plus the permissions your token has. It sorts token problems from account access problems and bad requests. You get the likely cause, a fix for each and a retry plan with a limit. It makes no calls itself.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "audit_report",
   "required": false,
   "label": "Audit report",
   "what": "findings with evidence, severity, missing inputs and next actions"
  }
 ],
 "you_give": [
  "The error code, type and message from each failing call, with the token removed",
  "Which call failed. Your ad accounts list, your Ad Library search or your insights pull",
  "The permissions your token has, as shown in Meta's token debugger",
  "Your role on the ad account, such as admin or analyst",
  "The request itself, with the token cut out, so fields and dates can be checked (optional)"
 ],
 "you_get": [
  "A list of what each call returned, with calls you did not test marked as such",
  "The likely cause for each failure, with the evidence behind it",
  "A fix for each cause, in the order to try them",
  "A retry plan with a wait and a limit on tries",
  "A checklist of the common failures, and made-up test cases to prove the fix"
 ],
 "use_when": [
  "Your Meta Ads report script worked last week and now returns an error code.",
  "You can list your ad accounts but the insights call comes back empty.",
  "The Ad Library search fails even though your ad account token works.",
  "You just made a new token and want to know which permissions it is missing."
 ],
 "skip_when": [
  "You haven't made a Meta developer app or token yet. Set that up in your Meta app dashboard first, then come back with the first error.",
  "Meta has not approved your app for the permission you need. This skill can show the symptom, but only a Meta app review fixes it.",
  "Your ad was rejected or your account is restricted. Use the Meta ad policy checker.",
  "You want code that pulls your Meta report. Use the Meta Ads reporting app planner."
 ],
 "output_sample": {
  "input": [
   "The error code and message from each failing call, with the token removed",
   "The permissions your token has, and your role on the ad account",
   "Your Ad Library token type, if the Ad Library call is failing (optional)"
  ],
  "prerequisites": [
   "A Meta developer app and a token you have already tried",
   "Access to Meta's token debugger to read the permissions"
  ],
  "output": [
   {
    "name": "Probe summary",
    "contains": "Each of your three calls marked passed, failed or not run, with its error."
   },
   {
    "name": "Diagnosis",
    "contains": "The likely cause for each failure, its evidence, how sure the AI is and the fix."
   },
   {
    "name": "Retry plan",
    "contains": "Which errors can be tried again, how long to wait and the most tries."
   },
   {
    "name": "Failure checklist",
    "contains": "The common failures, each marked ruled out or still open."
   },
   {
    "name": "Test cases",
    "contains": "Made-up errors with the diagnosis each should give, to check your fix."
   }
  ]
 },
 "output_shape": "BASIS\n<what you supplied, what is missing, nothing was run>\n\nPROBE SUMMARY\n<call> | <result: passed / failed / not run> | <error code and message>\n\nDIAGNOSIS\n<cause> | <evidence> | <confidence> | <proposed fix>\n\nRETRY PLAN\n<error type> | <retry: yes or no> | <wait> | <max tries>\n\nFAILURE CHECKLIST\n<common failure> | <ruled out or still open>\n\nTEST CASES\n<name> | <made-up error or setup> | <expected diagnosis>\n\nNEXT STEP\n<the smallest useful step>",
 "how_to_use": [
  "Open Claude, ChatGPT or Gemini and paste the skill.",
  "Paste the error text for each failing call. Cut out the token first. Never paste a token or an app secret.",
  "Add which permissions the token has and your role on the ad account. Meta's token debugger shows the permissions.",
  "Read the PROBE SUMMARY first. Check that each call is labelled the way you ran it.",
  "Try the first fix in the DIAGNOSIS table, then test that one call again. Change one thing at a time.",
  "Keep the retry limit in your own code. Do not retry login or permission errors until they are fixed."
 ],
 "checks": [],
 "next": [
  {
   "name": "API spec writer",
   "url": "https://useaiblocks.com/skills/api-spec-writer",
   "why": "Build it"
  },
  {
   "name": "Expo React Native data fetching coder",
   "url": "https://useaiblocks.com/skills/mobile-data-fetching-coder",
   "why": "Build it"
  },
  {
   "name": "vLLM model server setup planner",
   "url": "https://useaiblocks.com/skills/vllm-model-server-setup",
   "why": "Build it"
  }
 ],
 "source": null,
 "credits": [],
 "files": [
  "references/method-notes.md",
  "references/test-ad-accounts.ts",
  "references/test-ads-library.ts",
  "references/test-insights.ts"
 ],
 "links": {
  "page": "https://useaiblocks.com/skills/graph-api-common-errors-implementation-planner",
  "markdown": "https://useaiblocks.com/skills/graph-api-common-errors-implementation-planner.md",
  "json": "https://useaiblocks.com/skills/graph-api-common-errors-implementation-planner.json",
  "instructions": "https://useaiblocks.com/skills/graph-api-common-errors-implementation-planner/SKILL.md",
  "download": "https://useaiblocks.com/skills/graph-api-common-errors-implementation-planner.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/graph-api-common-errors-implementation-planner",
  "api_document": "https://useaiblocks.com/api/v1/documents/skill/graph-api-common-errors-implementation-planner",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
