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

feat: upgrade whatsapp support on Twilio Programmable Messaging #1249

Merged
merged 5 commits into from
Sep 29, 2023

Conversation

J0
Copy link
Contributor

@J0 J0 commented Sep 15, 2023

What kind of change does this PR introduce?

As of October, Meta will be having a separate category for billing authentication related templates (such as OTP). Consequently, it looks like WhatsApp Authentication templates need to be submitted for approval via the content API.

Consequently, there are two new parameters ContentSID and ContentVariables that need to be passed in. ContentVariables contains the OTP and can be passed down from the calling functions. These parameters are needed in order to allow for WhatsApp use on Twilio Programmable Messaging after October

According to Twilio Support, Twilio Verify is unaffected by this change.

What is the current behavior?

Programmable Messaging will use WhatsApp templates from Twilio Dashboard

What is the new behavior?

Programmable Messaging (WhatsApp) will use templates from Content API

Additional context

Unlike other templates the body is preset by WhatsApp. Some modifications can be made by specifying certain parameters however custom authentication templates are not allowed.

will need to call this out on the dashboard

  • This was tested manually by sending an OTP via toy application

FLUPs required

  • Update Dashboard to include ContentSID
  • Update Twilio Programmable Messaging to advise users to submit templates for approval. Also advise devs that they will have to move any internationalization logic until further notice. They will also need to re-submit respective templates in each language. This also means that devs using WhatsApp with programmable messaging will only be able to use one language (English) unless we pass contentSID in as a parameter

@J0 J0 marked this pull request as ready for review September 25, 2023 07:56
@J0 J0 requested a review from a team as a code owner September 25, 2023 07:56
internal/api/sms_provider/twilio.go Outdated Show resolved Hide resolved
@kangmingtay
Copy link
Member

LGTM - thanks for putting this up

@J0 J0 merged commit c58febe into master Sep 29, 2023
1 check passed
@J0 J0 deleted the j0/update_twilio_whatsapp_support branch September 29, 2023 06:57
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.98.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

J0 added a commit that referenced this pull request Oct 2, 2023
J0 added a commit that referenced this pull request Oct 3, 2023
#1263)

…ng (#1249)"

This reverts commit c58febe.

Twilio recently
[updated](https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023)
that they will support the basic, legacy, message for WhatsApp Twilio
API (e.g. "Your Code is 123456") This means that existing devs using
WhatsApp should be able to continue to use WhatsApp if they don't
require customization in the message (e.g. "Your Code is 123456, for
more information visit bestboats.com"). In the latter use case,
developers can opt to make use of Twilio Verify which has limited
restrictions around template structure

Devs will more advanced use cases can move to Twilio Verify

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.
J0 added a commit that referenced this pull request Oct 10, 2023
…ging to support Content API (#1266)

Resinstates WhatsApp support for the content API by reinstating:
#1249


After further discussion, it looks like we do have users who are using
custom SMS templates (e.g. "Your <company> code is {{.code}} ")

We were notified that this is required as alphanumeric senders require
the company name in the message. This means we will need to support the
Content API as custom messages aren't allowed under Programmable
Messaging API + WhatsApp Template


There will be 2 more PRs after this:
1. PR to allow for backward compatibility with Basic Authentication
Template
2. PR to add ContentSid env var
3. Dashboard PR to expose variable
hoeseong19 pushed a commit to hoeseong19/gotrue that referenced this pull request Oct 16, 2023
supabase#1263)

…ng (supabase#1249)"

This reverts commit c58febe.

Twilio recently
[updated](https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023)
that they will support the basic, legacy, message for WhatsApp Twilio
API (e.g. "Your Code is 123456") This means that existing devs using
WhatsApp should be able to continue to use WhatsApp if they don't
require customization in the message (e.g. "Your Code is 123456, for
more information visit bestboats.com"). In the latter use case,
developers can opt to make use of Twilio Verify which has limited
restrictions around template structure

Devs will more advanced use cases can move to Twilio Verify

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.
hoeseong19 pushed a commit to hoeseong19/gotrue that referenced this pull request Oct 16, 2023
…ging to support Content API (supabase#1266)

Resinstates WhatsApp support for the content API by reinstating:
supabase#1249


After further discussion, it looks like we do have users who are using
custom SMS templates (e.g. "Your <company> code is {{.code}} ")

We were notified that this is required as alphanumeric senders require
the company name in the message. This means we will need to support the
Content API as custom messages aren't allowed under Programmable
Messaging API + WhatsApp Template


There will be 2 more PRs after this:
1. PR to allow for backward compatibility with Basic Authentication
Template
2. PR to add ContentSid env var
3. Dashboard PR to expose variable
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
…base#1249)

## What kind of change does this PR introduce?

As of October, Meta will be having a separate category [for billing
authentication related templates (such as
OTP)](https://support.twilio.com/hc/en-us/articles/13550552351771-Notice-Changes-to-WhatsApp-Template-Approval-Workflows-April-2023-).
Consequently, it looks like WhatsApp Authentication templates need to be
[submitted for approval via the content
API](https://www.twilio.com/docs/content/whatsappauthentication?code-sample=code-sending-wa-authentication-templates&code-language=Go&code-sdk-version=1.x).

Consequently, there are two new parameters `ContentSID` and
`ContentVariables` that need to be passed in. `ContentVariables`
contains the OTP and can be passed down from the calling functions.
These parameters are needed in order to allow for WhatsApp use on Twilio
Programmable Messaging after October

According to Twilio Support, Twilio Verify is unaffected by this change.

## What is the current behavior?

Programmable Messaging will use WhatsApp templates from Twilio Dashboard

## What is the new behavior?

Programmable Messaging (WhatsApp) will use templates from Content API

## Additional context

- It looks like [message Content on WhatsApp will be largely
standardized](https://www.twilio.com/docs/content/whatsappauthentication)
so message content can't be customized.

>Unlike other templates the body is preset by WhatsApp. Some
modifications can be made by specifying certain parameters however
custom authentication templates are not allowed.

will need to call this out on the dashboard

- This was tested manually by sending an OTP via toy application


## FLUPs required
- [ ] Update Dashboard to include `ContentSID`
- [ ] Update Twilio Programmable Messaging to advise users to submit
templates for approval. Also advise devs that they will have to move any
internationalization logic until further notice. They will also need to
re-submit respective templates in each language. This also means that
devs using WhatsApp with programmable messaging will only be able to use
one language (English) unless we pass contentSID in as a parameter

---------

Co-authored-by: joel@joellee.org <joel@joellee.org>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
supabase#1263)

…ng (supabase#1249)"

This reverts commit c58febe.

Twilio recently
[updated](https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023)
that they will support the basic, legacy, message for WhatsApp Twilio
API (e.g. "Your Code is 123456") This means that existing devs using
WhatsApp should be able to continue to use WhatsApp if they don't
require customization in the message (e.g. "Your Code is 123456, for
more information visit bestboats.com"). In the latter use case,
developers can opt to make use of Twilio Verify which has limited
restrictions around template structure

Devs will more advanced use cases can move to Twilio Verify

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
…ging to support Content API (supabase#1266)

Resinstates WhatsApp support for the content API by reinstating:
supabase#1249


After further discussion, it looks like we do have users who are using
custom SMS templates (e.g. "Your <company> code is {{.code}} ")

We were notified that this is required as alphanumeric senders require
the company name in the message. This means we will need to support the
Content API as custom messages aren't allowed under Programmable
Messaging API + WhatsApp Template


There will be 2 more PRs after this:
1. PR to allow for backward compatibility with Basic Authentication
Template
2. PR to add ContentSid env var
3. Dashboard PR to expose variable
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
…base#1249)

## What kind of change does this PR introduce?

As of October, Meta will be having a separate category [for billing
authentication related templates (such as
OTP)](https://support.twilio.com/hc/en-us/articles/13550552351771-Notice-Changes-to-WhatsApp-Template-Approval-Workflows-April-2023-).
Consequently, it looks like WhatsApp Authentication templates need to be
[submitted for approval via the content
API](https://www.twilio.com/docs/content/whatsappauthentication?code-sample=code-sending-wa-authentication-templates&code-language=Go&code-sdk-version=1.x).

Consequently, there are two new parameters `ContentSID` and
`ContentVariables` that need to be passed in. `ContentVariables`
contains the OTP and can be passed down from the calling functions.
These parameters are needed in order to allow for WhatsApp use on Twilio
Programmable Messaging after October

According to Twilio Support, Twilio Verify is unaffected by this change.

## What is the current behavior?

Programmable Messaging will use WhatsApp templates from Twilio Dashboard

## What is the new behavior?

Programmable Messaging (WhatsApp) will use templates from Content API

## Additional context

- It looks like [message Content on WhatsApp will be largely
standardized](https://www.twilio.com/docs/content/whatsappauthentication)
so message content can't be customized.

>Unlike other templates the body is preset by WhatsApp. Some
modifications can be made by specifying certain parameters however
custom authentication templates are not allowed.

will need to call this out on the dashboard

- This was tested manually by sending an OTP via toy application


## FLUPs required
- [ ] Update Dashboard to include `ContentSID`
- [ ] Update Twilio Programmable Messaging to advise users to submit
templates for approval. Also advise devs that they will have to move any
internationalization logic until further notice. They will also need to
re-submit respective templates in each language. This also means that
devs using WhatsApp with programmable messaging will only be able to use
one language (English) unless we pass contentSID in as a parameter

---------

Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
supabase#1263)

…ng (supabase#1249)"

This reverts commit c58febe.

Twilio recently
[updated](https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023)
that they will support the basic, legacy, message for WhatsApp Twilio
API (e.g. "Your Code is 123456") This means that existing devs using
WhatsApp should be able to continue to use WhatsApp if they don't
require customization in the message (e.g. "Your Code is 123456, for
more information visit bestboats.com"). In the latter use case,
developers can opt to make use of Twilio Verify which has limited
restrictions around template structure

Devs will more advanced use cases can move to Twilio Verify

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
…ging to support Content API (supabase#1266)

Resinstates WhatsApp support for the content API by reinstating:
supabase#1249


After further discussion, it looks like we do have users who are using
custom SMS templates (e.g. "Your <company> code is {{.code}} ")

We were notified that this is required as alphanumeric senders require
the company name in the message. This means we will need to support the
Content API as custom messages aren't allowed under Programmable
Messaging API + WhatsApp Template


There will be 2 more PRs after this:
1. PR to allow for backward compatibility with Basic Authentication
Template
2. PR to add ContentSid env var
3. Dashboard PR to expose variable
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
…base#1249)

## What kind of change does this PR introduce?

As of October, Meta will be having a separate category [for billing
authentication related templates (such as
OTP)](https://support.twilio.com/hc/en-us/articles/13550552351771-Notice-Changes-to-WhatsApp-Template-Approval-Workflows-April-2023-).
Consequently, it looks like WhatsApp Authentication templates need to be
[submitted for approval via the content
API](https://www.twilio.com/docs/content/whatsappauthentication?code-sample=code-sending-wa-authentication-templates&code-language=Go&code-sdk-version=1.x).

Consequently, there are two new parameters `ContentSID` and
`ContentVariables` that need to be passed in. `ContentVariables`
contains the OTP and can be passed down from the calling functions.
These parameters are needed in order to allow for WhatsApp use on Twilio
Programmable Messaging after October

According to Twilio Support, Twilio Verify is unaffected by this change.

## What is the current behavior?

Programmable Messaging will use WhatsApp templates from Twilio Dashboard

## What is the new behavior?

Programmable Messaging (WhatsApp) will use templates from Content API

## Additional context

- It looks like [message Content on WhatsApp will be largely
standardized](https://www.twilio.com/docs/content/whatsappauthentication)
so message content can't be customized.

>Unlike other templates the body is preset by WhatsApp. Some
modifications can be made by specifying certain parameters however
custom authentication templates are not allowed.

will need to call this out on the dashboard

- This was tested manually by sending an OTP via toy application


## FLUPs required
- [ ] Update Dashboard to include `ContentSID`
- [ ] Update Twilio Programmable Messaging to advise users to submit
templates for approval. Also advise devs that they will have to move any
internationalization logic until further notice. They will also need to
re-submit respective templates in each language. This also means that
devs using WhatsApp with programmable messaging will only be able to use
one language (English) unless we pass contentSID in as a parameter

---------

Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
supabase#1263)

…ng (supabase#1249)"

This reverts commit c58febe.

Twilio recently
[updated](https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023)
that they will support the basic, legacy, message for WhatsApp Twilio
API (e.g. "Your Code is 123456") This means that existing devs using
WhatsApp should be able to continue to use WhatsApp if they don't
require customization in the message (e.g. "Your Code is 123456, for
more information visit bestboats.com"). In the latter use case,
developers can opt to make use of Twilio Verify which has limited
restrictions around template structure

Devs will more advanced use cases can move to Twilio Verify

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
…ging to support Content API (supabase#1266)

Resinstates WhatsApp support for the content API by reinstating:
supabase#1249


After further discussion, it looks like we do have users who are using
custom SMS templates (e.g. "Your <company> code is {{.code}} ")

We were notified that this is required as alphanumeric senders require
the company name in the message. This means we will need to support the
Content API as custom messages aren't allowed under Programmable
Messaging API + WhatsApp Template


There will be 2 more PRs after this:
1. PR to allow for backward compatibility with Basic Authentication
Template
2. PR to add ContentSid env var
3. Dashboard PR to expose variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants