shufflepuff encountered an error when creating users via the Discourse API, due to hitting the ‘Max new accounts per registration IP’ limit. The IP in question is fixed, as requests originate from a central server. JammyDodger suggested bypassing the restriction by allowing the specific IP address via the /admin/logs/screened_ip_addresses page, noting that wildcards or CIDR notation can also be used for ranges. shufflepuff initially tried this but still received the error — until they remembered to also add the IPv6 address, after which the API user creation worked successfully. This confirms that both IPv4 and IPv6 addresses must be explicitly allowlisted if both are in use. The solution avoids disabling the global max_new_accounts_per_registration_ip setting, preserving security for other IPs while enabling automated user creation from trusted sources.
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.
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.