{"id":1565,"date":"2025-04-15T19:20:21","date_gmt":"2025-04-15T13:50:21","guid":{"rendered":"https:\/\/www.smsgatewaycenter.com\/blog\/?post_type=docs&#038;p=1565"},"modified":"2025-04-15T19:20:23","modified_gmt":"2025-04-15T13:50:23","password":"","slug":"how-to-integrate-smsgatewaycenter-otp-sms-api","status":"publish","type":"docs","link":"https:\/\/www.smsgatewaycenter.com\/blog\/kb\/how-to-integrate-smsgatewaycenter-otp-sms-api\/","title":{"rendered":"How to Integrate SMSGatewayCenter OTP SMS API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ready to secure your transactions with SMSGatewayCenter\u2019s <strong><a href=\"https:\/\/www.smsgatewaycenter.com\/developer-api\/generate-otp\/\">OTP SMS API<\/a><\/strong>? This powerful tool generates and delivers one-time passwords instantly, perfect for 2FA or user verification. Let\u2019s walk through the integration process step-by-step!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Integration Steps<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Get Your Credentials<\/strong>: Log in to your SMSGatewayCenter account, head to the API section, and grab your <code>userId<\/code>, <code>password<\/code>, and <code>senderId<\/code> (ensure it\u2019s DLT-registered for compliance).<\/li>\n\n\n\n<li><strong>Choose Your Method<\/strong>: Use POST or GET requests. Endpoint: <strong>https:\/\/unify.smsgateway.center\/SMSApi\/otp<\/strong>.<\/li>\n\n\n\n<li><strong>Set Up Parameters<\/strong>: Include required fields like <code>userId<\/code>, <code>password<\/code>, <code>mobile<\/code> (e.g., <code>919876543210<\/code>), <code>msg<\/code> (e.g., <code>Your OTP is $otp$<\/code>), <code>codeLength<\/code> (e.g., <code>4<\/code>), and <code>sendMethod=generate<\/code>. Example (PHP with cURL):<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   $curl = curl_init();\n   curl_setopt_array($curl, array(\n       CURLOPT_URL => \"https:\/\/unify.smsgateway.center\/SMSApi\/otp\",\n       CURLOPT_RETURNTRANSFER => true,\n       CURLOPT_POSTFIELDS => \"userid=YourUserName&amp;password=YourPassword&amp;mobile=919876543210&amp;msg=Your OTP is $otp$&amp;codeLength=4&amp;sendMethod=generate\",\n   ));\n   $response = curl_exec($curl);\n   curl_close($curl);\n   echo $response;<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Test the API<\/strong>: Send a test OTP and check the response (e.g., <code>status: success<\/code>, <code>transactionId<\/code>).<\/li>\n\n\n\n<li><strong>Implement Verification<\/strong>: Use <code>sendMethod=verify<\/code> with the <code>otp<\/code> value entered by the user to validate.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Best Practices<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Register OTP templates with DLT for compliance.<\/li>\n\n\n\n<li>Set <code>codeExpiry<\/code> (e.g., 60 seconds) to limit OTP validity.<\/li>\n\n\n\n<li>Use HTTPS to secure data transmission.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Support<\/strong><br>Need assistance? Reach out to contact @ smsgatewaycenter.com or call +912228657726.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ready to secure your transactions with SMSGatewayCenter\u2019s OTP SMS API? This powerful tool generates and delivers one-time passwords instantly, perfect for 2FA or user verification. Let\u2019s walk through the integration process step-by-step! Integration Steps Best Practices SupportNeed assistance? Reach out to contact @ smsgatewaycenter.com or call +912228657726.<\/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-1565","docs","type-docs","status-publish","hentry","doc_category-api"],"year_month":"2026-07","word_count":220,"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\/1565","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=1565"}],"version-history":[{"count":0,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs\/1565\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/media?parent=1565"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/doc_category?post=1565"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/doc_tag?post=1565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}