Bypass "Max new accounts per registration IP" limit when creating users via API

Hi there, I am using a global API token to create users in my Discourse forum. I noticed that it stopped working, with the following error message:

New registrations are not allowed from your IP address (maximum limit reached). Contact a staff member.

The IP address is always the same, as these requests are coming from a central server of mine.

I was wondering if there’s any setting I can turn on to disable this check when the user is created via the API endpoint POST /users.json, as I would not want to set max_new_accounts_per_registration_ip to 0.

Thanks in advance!

I think you can ‘allow’ an individual IP address from your /admin/logs/screened_ip_addresses page. This should then let you bypass that restriction for only that IP.

ETA: A little more info from the guide:

1 Like

I tried adding the IP address to the list, but unfortunately it still gives me the same error when trying to create a user via API.

Edit: I forgot to also add the IPv6 address. Seems to work now!

2 Likes