As it turns out, I’m getting this error:
New registrations are not allowed from your IP address (maximum limit reached). Contact a staff member.
… which is discussed in this thread.
I changed the make some adjustments to the API rate limit and set the “max new accounts per registration ip” setting to zero and it’s now working fine.