{"id":1482,"date":"2025-03-03T20:52:55","date_gmt":"2025-03-03T15:22:55","guid":{"rendered":"https:\/\/www.smsgatewaycenter.com\/blog\/?post_type=docs&#038;p=1482"},"modified":"2025-03-03T20:52:56","modified_gmt":"2025-03-03T15:22:56","password":"","slug":"how-do-i-debug-if-my-api-is-not-working","status":"publish","type":"docs","link":"https:\/\/www.smsgatewaycenter.com\/blog\/kb\/how-do-i-debug-if-my-api-is-not-working\/","title":{"rendered":"How do I debug if my API is not working?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If your <strong><a href=\"https:\/\/www.smsgatewaycenter.com\/developer-api\/\">SMSGatewayCenter API integration<\/a><\/strong> isn\u2019t working, follow these debugging steps:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Verify Credentials<\/strong>: Ensure your <strong>userid<\/strong>, <strong>password<\/strong>, or API key is correct and hasn\u2019t expired. Regenerate your API key if needed via the portal under &#8220;<strong>API Key Settings.<\/strong>&#8220;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check Parameters<\/strong>: Confirm all required parameters (e.g., senderid, mobile, msg) are included and properly formatted. Use URL encoding for special characters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Review Response Codes<\/strong>: Check the API response for status codes (e.g., 200 for success, 401 for authentication failure). The response will include a reason field explaining errors\u2014log this for analysis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Test with Sample Scripts<\/strong>: Use our provided sample scripts (e.g., PHP CURL) to compare against your code. Start with a simple test message to a single number.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Inspect Network Requests<\/strong>: Ensure your HTTP request (GET\/POST) to <strong>https:\/\/unify.smsgateway.center\/SMSApi\/send<\/strong> or other endpoints is correctly formatted and not blocked by firewalls.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Contact Support<\/strong>: If issues persist, reach out to our 24\/7 support team with your API request details, response, and error logs for quick resolution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our documentation and resources are designed to help thousands of developers troubleshoot effectively.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your SMSGatewayCenter API integration isn\u2019t working, follow these debugging steps: Verify Credentials: Ensure your userid, password, or API key is correct and hasn\u2019t expired. Regenerate your API key if needed via the portal under &#8220;API Key Settings.&#8220; Check Parameters: Confirm all required parameters (e.g., senderid, mobile, msg) are included and properly formatted. Use URL [&hellip;]<\/p>\n","protected":false},"author":118,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[1334],"doc_tag":[],"class_list":["post-1482","docs","type-docs","status-publish","hentry","doc_category-api"],"year_month":"2026-07","word_count":183,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/www.smsgatewaycenter.com\/blog\/author\/admin\/"},"doc_category_info":[{"term_name":"API","term_url":"https:\/\/www.smsgatewaycenter.com\/blog\/kb-cat\/api\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs\/1482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/users\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/comments?post=1482"}],"version-history":[{"count":0,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs\/1482\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/media?parent=1482"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/doc_category?post=1482"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/doc_tag?post=1482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}