{"id":489,"date":"2024-11-07T11:12:10","date_gmt":"2024-11-07T05:42:10","guid":{"rendered":"https:\/\/www.msgclub.net\/learn\/?p=489"},"modified":"2024-11-07T11:12:10","modified_gmt":"2024-11-07T05:42:10","slug":"showing-ip-block-in-api","status":"publish","type":"post","link":"https:\/\/www.msgclub.net\/learn\/showing-ip-block-in-api.html","title":{"rendered":"Showing IP Block in API"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Issue Overview:<\/strong><\/h2>\n\n\n\n<p>When you attempt to access an SMS API, you might encounter an error indicating that your IP is blocked. This typically occurs when there are IP restrictions in place for authentication. The IP Block status is shown in the response as a security measure to prevent unauthorized access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Cause of the IP Block:<\/strong><\/h2>\n\n\n\n<p>When you send a request to the SMS API, it requires an authentication process to verify the request. During this authentication, there is an option called <strong>IP Restriction<\/strong>. If IP Restriction is enabled for your account, the server will only accept requests coming from specific whitelisted IP addresses.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IP Restricted Option:<\/strong> This option is designed to ensure that only authorized, trusted IP addresses can access the API. If your IP is not on the whitelist, you will receive an &#8220;IP Blocked&#8221; error in the response.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Why This Happens:<\/strong> The IP restriction feature is implemented for security purposes to protect user data and prevent unauthorized access to the API. This can help ensure that only requests from known and trusted sources are processed by the server.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Overcome the &#8220;IP Blocked&#8221; Error:<\/strong><\/h2>\n\n\n\n<p>There are two potential solutions to resolve the &#8220;IP Blocked&#8221; error:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Add Your IP to the IP Restriction Whitelist:<\/strong>\n<ul class=\"wp-block-list\">\n<li>You will need to add your current IP address to the <strong>IP Restriction List<\/strong> in your account settings. This can be done by contacting your API provider or accessing the user control panel where you manage your API settings.<\/li>\n\n\n\n<li>Once your IP is added to the whitelist, your requests will be accepted, and the &#8220;IP Blocked&#8221; error will be resolved.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Disable IP Restrictions (Not Recommended):<\/strong>\n<ul class=\"wp-block-list\">\n<li>If you are unable to add your IP to the whitelist, you can choose to remove the IP restriction option entirely from your user settings. This will effectively allow any IP address to access the API, but it may compromise security.<\/li>\n\n\n\n<li><strong>Important:<\/strong> Disabling IP restrictions is not recommended as it can expose your account to unauthorized access, potentially leading to security risks.<path d=\"m12.856 5.457-.937.92a1 1 0 0 0 0 1.437 1.047 1.047 0 0 0 1.463 0l.984-.966c.967-.95 2.542-1.135 3.602-.288a2.54 2.54 0 0 1 .203 3.81l-2.903 2.852a2.646 2.646 0 0 1-3.696 0l-1.11-1.09L9 13.57l1.108 1.089c1.822 1.788 4.802 1.788 6.622 0l2.905-2.852a4.558 4.558 0 0 0-.357-6.82c-1.893-1.517-4.695-1.226-6.422.47\"><\/path><path d=\"m11.144 19.543.937-.92a1 1 0 0 0 0-1.437 1.047 1.047 0 0 0-1.462 0l-.985.966c-.967.95-2.542 1.135-3.602.288a2.54 2.54 0 0 1-.203-3.81l2.903-2.852a2.646 2.646 0 0 1 3.696 0l1.11 1.09L15 11.43l-1.108-1.089c-1.822-1.788-4.802-1.788-6.622 0l-2.905 2.852a4.558 4.558 0 0 0 .357 6.82c1.893 1.517 4.695 1.226 6.422-.47\"><\/path><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Steps to Resolve:<\/strong><\/h2>\n\n\n\n<p><strong>Option 1: Add Your IP to the IP Restriction List<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access your user settings or API management panel<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"523\" src=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/ff0b6aee-83fd-4c95-af02-3c436878a7b0.png\" alt=\"\" class=\"wp-image-490\" srcset=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/ff0b6aee-83fd-4c95-af02-3c436878a7b0.png 748w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/ff0b6aee-83fd-4c95-af02-3c436878a7b0-300x210.png 300w\" sizes=\"auto, (max-width: 748px) 100vw, 748px\" \/><\/figure>\n\n\n\n<p>Look for the section related to <strong>IP Restrictions<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"207\" src=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb-1024x207.png\" alt=\"\" class=\"wp-image-491\" srcset=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb-1024x207.png 1024w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb-300x61.png 300w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb-768x155.png 768w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb-1536x310.png 1536w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb-1568x316.png 1568w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/b833a1c6-81f8-4d8b-a40a-f8ba477cf1cb.png 1898w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Add the IP address that you are using to access the API.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"200\" src=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497-1024x200.png\" alt=\"\" class=\"wp-image-492\" srcset=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497-1024x200.png 1024w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497-300x59.png 300w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497-768x150.png 768w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497-1536x300.png 1536w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497-1568x306.png 1568w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/497f5327-2399-40b9-979c-1a8a8b7f2497.png 1897w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Save your changes and try accessing the API again. The &#8220;IP Blocked&#8221; error should be resolved.<\/p>\n\n\n\n<p> <strong>Option 2: Disable IP Restriction (if applicable)<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If adding your IP address is not an option, and you understand the security implications, you can disable the IP Restriction feature in your settings.<\/li>\n\n\n\n<li>Access the <strong>IP Restriction<\/strong> settings and turn off the feature.<\/li>\n\n\n\n<li>Save your changes and retry accessing the API.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"179\" src=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347-1024x179.png\" alt=\"\" class=\"wp-image-493\" srcset=\"https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347-1024x179.png 1024w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347-300x52.png 300w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347-768x134.png 768w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347-1536x268.png 1536w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347-1568x274.png 1568w, https:\/\/www.msgclub.net\/learn\/wp-content\/uploads\/2024\/11\/1372ec60-fc78-4a80-8028-d8fc96ab6347.png 1890w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Security Considerations:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Always use IP whitelisting<\/strong> where possible to protect your account and sensitive data.<\/li>\n\n\n\n<li><strong>Monitor API access<\/strong> to ensure that only authorized users or systems are able to interact with your API.<\/li>\n<\/ul>\n\n\n\n<p>By following these steps, you should be able to resolve the &#8220;IP Blocked&#8221; error and regain access to the SMS API while maintaining the security of your account.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Issue Overview: When you attempt to access an SMS API, you might encounter an error indicating that your IP is blocked. This typically occurs when there are IP restrictions in place for authentication. The IP Block status is shown in the response as a security measure to prevent unauthorized access. Cause of the IP Block:&hellip; <a class=\"more-link\" href=\"https:\/\/www.msgclub.net\/learn\/showing-ip-block-in-api.html\">Continue reading <span class=\"screen-reader-text\">Showing IP Block in API<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":4,"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":497,"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/posts\/489\/revisions\/497"}],"wp:attachment":[{"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msgclub.net\/learn\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}