HTTPError: 403 Client Error: Forbidden for url

When I’m trying to send SMS getting below error. If I go to url directly from browser it’s working.

Traceback (most recent call last):
File “/home/erpnext/unitex/apps/frappe/frappe/”, line 56, in application
response = frappe.handler.handle()
File “/home/erpnext/unitex/apps/frappe/frappe/”, line 19, in handle
File “/home/erpnext/unitex/apps/frappe/frappe/”, line 42, in execute_cmd
ret =, **frappe.form_dict)
File “/home/erpnext/unitex/apps/frappe/frappe/”, line 903, in call
return fn(*args, **newargs)
File “/home/erpnext/unitex/apps/frappe/frappe/”, line 73, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/home/erpnext/unitex/apps/frappe/frappe/desk/form/”, line 35, in runserverobj
r = doc.run_method(method)
File “/home/erpnext/unitex/apps/frappe/frappe/model/”, line 655, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/unitex/apps/frappe/frappe/model/”, line 871, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/unitex/apps/frappe/frappe/model/”, line 854, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/unitex/apps/frappe/frappe/model/”, line 649, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erpnext/unitex/apps/erpnext/erpnext/selling/doctype/sms_center/”, line 79, in send_sms
send_sms(receiver_list, cstr(self.message))
File “/home/erpnext/unitex/apps/erpnext/erpnext/setup/doctype/sms_settings/”, line 68, in send_sms
File “/home/erpnext/unitex/apps/erpnext/erpnext/setup/doctype/sms_settings/”, line 81, in send_via_gateway
status = send_request(ss.sms_gateway_url, args)
File “/home/erpnext/unitex/apps/erpnext/erpnext/setup/doctype/sms_settings/”, line 96, in send_request
File “/home/erpnext/unitex/env/local/lib/python2.7/site-packages/requests/”, line 909, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 403 Client Error: Forbidden for url:

Most probably your password is incorrect or some other authentication is missing.

1 Like

Thank you @rmehta for your kind attention. That problem happened in my pc erpnext development mode but I’m curious about that after site goes on production mode that problem solved :slight_smile: