How many users could be created via rest api call using single IP Address in discourse?

(Boopathi S) #1

i am getting this message when i create user through the single address安hat is the maximum limit?is there any solution for this如lease suggest me ideas.

  "success": false,
  "message": "New registrations are not allowed from your IP address.",
  "errors": {
    "email": [],
    "ip_address": ["New registrations are not allowed from your IP address."]
  "values": {
    "name": "roberthinn",
    "username": "roberth",
    "email": ""

(Kevin P. Fleming) #2

That looks like a bug; using the API to create users should not be subject to IP address checking.

(Jeff Atwood) #3

For spam reasons there is a maximum of new TL0 users that can be created from the same IP. Either change the limit in site settings or make sure one of the users from that IP is staff.

(Kevin P. Fleming) #4

Yes, I remembered that, but creation directly via the API should not be a spam concern, right?

(Boopathi S) #5

yeah thanks for replies

(Boopathi S) #6
here jsmith is Groups Automatic trust_level_0, trust_level_1, trust_level_2, trust_level_3, trust_level_4, admins, staff, moderators eventhough i changed the site limit to 10 again it shows the same error message

(Boopathi S) #7

what thing i have to do

(Boopathi S) #8
<cfhttp url ="http://xxxx:3000/users?api_key=xxxx&api_username=jsmith"  method="post"> 

this is the url i posted

(Boopathi S) #9

@codinghorror : make sure there is at least one staff member from each IP .sir could you explain this? i couldnt get this point


So say you register a lot of people from the IP You can only have so many before the server will stop letting users register.

However, if you have a staff member (even if the account is never used) that registered from the same IP, the IP limit is unlimited (the server will always let accounts from that IP be made).

(Boopathi S) #11

i get your point在ut i will create only 5 or 6 users via api存o whats the solution for this?

(Jeff Atwood) #12

Same code path so this applies to api as well.

(Boopathi S) #13

i already created 3 users through rest api call then i got error
New registrations are not allowed from your IP address then i change the site_settings of max_new_accounts_per_registration_ip from 3 to 30 . then i try to create user but it throws the same error.
what could be the right solution for this? help me this out please

(Jeff Atwood) #14

You might need to restart Discourse for that setting to take effect. Just reboot your server is easiest.

(Arul Baskar) #15

@codinghorror same error occurred. am spam setting change and restart server. but not change to any change to this solution. please help me . am check to the table for 'site_settings
name: max_new_accounts_per_registration_ip
data_type: 3
value : 20

any value changes?

(Jeff Atwood) #16

Check Admin, Logs, IP and see if those IPs are banned on your site?

(Arul Baskar) #17

@codinghorror thanks to ur support and now check logs->screenIPs , ip action was blocked. now allow to ip action. its working fine.
thanks to supports @codinghorror