Register and manage domains with Cloudflare Registrar API?

Hey CF community!

I’ve been working with the Cloudflare API to manage zones and started to register and transfer domains through the registrar UI. I built an app that I use to manage my domains across GoDaddy and Name through their APIs and ultimately want to shift to using Cloudflare’s registrar for cost-savings and architectural simplicity purposes.

I read the registrar API documentation. I have been working with the zones and account endpoints successfully, so this should have been a fairly straightforward implementation.

However I receive the following error whenever I attempt to access any of the registrar endpoints:

POST /client/v4/accounts/{account_identifier}/registrar/domains
{
  "success": false,
  "errors": [
    {
      "code": 10000,
      "message": "Authentication error"
    }
  ]
}

This is a different error than if I pass an invalid token or api_key or do not have access to a particular permission. Additionally, account and zone endpoints work normally.

After doing some digging, I was able to find this post from a Cloudflare team member in May '22 saying this was a feature for “Enterprise customers”. However, this is the only reference I have been able to find and API docs don’t mention similar limitations.

In Dec '21, another post touched on this and looped in registrar’s product manager, @ebrown , to find out more details on a potential timeline or priority. I do not know if the API endpoints were published on the docs at that point.

I also created a registrar support ticket to learn more, so I’m keeping an eye on that.

Questions for the community:

  • Is anyone else currently using the Registrar API successfully? Did you have to reach out for access?
  • Anyone else experiencing the same error?
  • Is there any official documentation on a path to access these endpoints?

Thanks!

2 Likes

Related posts from other users about the registrar API

Documentation

Success!
I was able to pull down the domain list and the docs aren’t totally clear about this. So here is what you will need to know if you want to hit the registrar endpoints:

1. Use your Global API Key and not the token
If you are using Authorization: Bearer you are using a token with specific permissions, some of which are likely not available to your account.

If you receive the following:

POST /client/v4/accounts/{account_identifier}/registrar/domains
{
  "success": false,
  "errors": [
    {
      "code": 10000,
      "message": "Authentication error"
    }
  ]
}

You are probably using Authorization: Bearer $token. Instead drop the Bearer token, and set X-Auth-Email and X-Auth-Key per the docs. You’ll find your global key below your tokens in your account settings.

X-Auth-Email: [email protected]
X-Auth-Key: YourGlobalApiKey

2. Use GET instead of POST on the list endpoint
I know the docs say POST, but it’s not POST. Use GET.

If you use POST you will receive the following error:

POST /client/v4/accounts/{account_identifier}/registrar/domains
{
  "result": null,
  "success": false,
  "errors": [
    {
      "code": 10000,
      "message": "You are not authorized to perform this action"
    }
  ],
  "messages": [
    "You are not authorized to perform this action"
  ]
}

Use GET and your list of domains will pull right up.

GET /client/v4/accounts/{account_identifier}/registrar/domains

Hope this helps and will update this thread if I run into similar issues.

cc @keithvsr

9 Likes

(post deleted by author)

1 Like

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