Import from wordpress json, admin permission denied

I’m sure it’s my fault, but I can’t seem to import from a wordpress taxonomy json.

I get this:

[ERROR] Failed to import term "Nueva Trova":
{
  errors: [
    {
      message: "You don't have permission to access this.",
      extensions: [Object]
    }
  ],
  response: Response {
    status: 403,
    statusText: 'Forbidden',
    headers: Headers {
      'content-security-policy': "script-src 'self' 'unsafe-eval';worker-src 'self' blob:;child-src 'self' blob:;img-src 'self' data: blob: https://raw.githubusercontent.com https://avatars.githubusercontent.com;media-src 'self';connect-src 'self' https://* wss://*;default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';object-src 'none';script-src-attr 'none';style-src 'self' https: 'unsafe-inline'",
      'x-powered-by': 'Directus',
      'content-type': 'application/json; charset=utf-8',
      'content-length': '102',
      etag: 'W/"66-OPr7zxcJy7+HqVGdrFe1XpeEIao"',
      date: 'Tue, 15 Jul 2025 00:37:41 GMT',
      connection: 'keep-alive',
      'keep-alive': 'timeout=5'
    },
    body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
    bodyUsed: true,
    ok: false,
    redirected: false,
    type: 'basic',
    url: 'http://89.117.51.136:8055/items/music_styles'
  }
}

As I said, I have a token that is admin, and it’s granted read, but not write? Seems like admin should be able to do anything.

Maybe I’m missing something in the docs.

I finally figured it out, and it had to do with the fact that I was trying to write to categories but it was setup as category. I didn’t think of that, but I’ve adjusted my script and now it works. I will be open sourcing this on GIT when I’m done for anyone looking to export from wordpress with custom post types and importing/creating in Directus.