-
Notifications
You must be signed in to change notification settings - Fork 77
sms service migration to gupshup. #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| ))); | ||
| } | ||
|
|
||
| // update db count :TODO: Make sure to move this line below before push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this comment 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh' that was reminder to myself I forget to remove that. Ill do that in final PR.
actually code should be this:
let _ = self.client.post(&self.gupshup_url).body("").send().await?;
let _ = state.db.update_otpc_by_number(&number).await?;
first send the otp. if otp send success then update the count.
|
@Praashh This is taking little longer. I haven't received the api keys yet. I'll keep you posted. |
don't we have test keys on gubshub sir? |
|
No, I also find this weird. I spoke to the support team, and they said you need to email them to get the keys. |
|
@Praashh This is complete. Please let me know if anything else is needed. |


Solves: #39
This PR includes the Gupshup migration with rate limiting, where a user is blocked for 30 minutes after three OTP attempts.
Process Overview
To send transactional SMS in India, we must register a sender ID (header) and an SMS template on the DLT platform, a blockchain system used by all telecom operators. Registration is done via the operator's portal (e.g., Jio's portal, it requies a PAN card and an annual fee of around ₹5,900. Once registered, we can register as many as header and template (template ID).
This template ID is then provided to Gupshup via their API to send SMS. Gupshup has tieup with telecom operators. it also requires PAN card verification for registration.
NOTE: This PR is not yet complete. I've requested access to a Gupshup account with my pen card, and once I receive the API key, I'll perform end-to-end testing and finalize the PR.
In the meantime, I’d appreciate a code review.