Code 1016 from private access token (PAT) issuer (production URL)

For Workers & Pages, what is the name of the domain?

localhost

What is the error number?

1016

What is the error message?

Error: internal error at async Object.fetch(…), at async jsonError (…), at async drainBody (…)

What is the issue or error you’re encountering

I am trying to verify that fetching private access token for my native iOS app via worker works using: pat.issuer.cloudflare.com/.well-known/token-issuer-directory

What steps have you taken to resolve the issue?

I have successfully used the same code using the demo version of URL
CF online/AI help informed me of which URL to use when. Unfortunately the help link regarding private-access-tokens is invalid
Unable to find any other information on steps or requirement for the use of the production version of token issuer

What are the steps to reproduce the issue?

Run a worker locally or deployed on CF and request a new PAT from production URL:

export default {
async fetch(request, env, ctx) {
try{
return await fetch(“https://pat.issuer.cloudflare.com/.well-known/token-issuer-directory”, { method: “GET”});
}
catch(err) {
return new Response(err.stack, {status: 500});
}
}
}

please cehck our docs here in regards to the common cause of 1016 issue and the resolution steps suggested : Troubleshooting Cloudflare 1XXX errors · Cloudflare Support docs

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.