Skip to content
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

DEVEXP-563: Add SMS 'Getting Started' code #4

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

asein-sinch
Copy link
Contributor

No description provided.

@@ -0,0 +1,5 @@
export const validateSignature = (req, res, next) => {
console.log('Validating SMS event signature.');
// Do nothing as this feature is not supported yet.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not supported yet, maybe it's better to skip it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rather not.
The Node.js SDK doesn't support the validation of the signature headers but the customer that will use this guide may have the feature activated on their account. If they want to perform the validation, the architecture is ready to do so.
Thus, I prefer to keep it this way.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asein-sinch asein-sinch requested a review from 650elx September 20, 2024 16:35
Copy link

@alex-sberna alex-sberna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

SINCH_PROJECT_ID = <Your Sinch Project ID>
SINCH_KEY_ID = <Your Sinch Key ID>
SINCH_KEY_SECRET = <Your Sinch Key Secret>
SMS_REGION = us

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as fro server template: is us is not yet the default value ?

keySecret: process.env.SINCH_KEY_SECRET,
servicePlanId: process.env.SINCH_SERVICE_PLAN_ID,
apiToken: process.env.SINCH_API_TOKEN,
smsRegion: process.env.SMS_REGION || SmsRegion.UNITED_STATES,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems SinchCLient is already setting it as a default value: https://github.com/sinch/sinch-sdk-node/blob/main/packages/sms/src/rest/v1/sms-domain-api.ts#L83
And we are setting again the default usvalue at config file level and also here
Sure: the us will be a very default value 😄

@@ -0,0 +1,5 @@
export const validateSignature = (req, res, next) => {
console.log('Validating SMS event signature.');
// Do nothing as this feature is not supported yet.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Base automatically changed from DEVEXP-562_Add-templates/server-for-GA-APIs to main September 24, 2024 09:20
@asein-sinch asein-sinch merged commit 87e6e88 into main Sep 24, 2024
1 check passed
@asein-sinch asein-sinch deleted the DEVEXP-563_Add-SMS-getting-started-code branch September 24, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants