Skip to content

Commit 255e02b

Browse files
committed
Add feature request board
1 parent aa8906a commit 255e02b

3 files changed

Lines changed: 146 additions & 47 deletions

File tree

web/layouts/website.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,18 @@
202202
</a>
203203
</v-hover>
204204
</li>
205+
<li class="mb-2">
206+
<v-hover v-slot="{ hover }">
207+
<a
208+
href="https://httpsms.featurebase.app"
209+
class="text--primary text-decoration-none"
210+
:class="{ 'text-decoration-underline': hover }"
211+
>
212+
Request Feature
213+
<v-icon small color="yellow">{{ mdiLightbulbOn50 }}</v-icon>
214+
</a>
215+
</v-hover>
216+
</li>
205217
</ul>
206218
</v-col>
207219
<v-col cols="12" md="3">
@@ -261,6 +273,7 @@ import {
261273
mdiTwitter,
262274
mdiHeart,
263275
mdiShieldStar,
276+
mdiLightbulbOn50,
264277
mdiCreation,
265278
mdiEyeOffOutline,
266279
mdiPost,
@@ -287,6 +300,7 @@ export default Vue.extend({
287300
mdiPost,
288301
mdiCircle,
289302
mdiShieldStar,
303+
mdiLightbulbOn50,
290304
mdiBookOpenVariant,
291305
}
292306
},

web/pages/blog/end-to-end-encryption-to-sms-messages.vue

Lines changed: 104 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
except you.
2222
</p>
2323
<p>
24-
The way it works is that you set up an encryption key which you use to
25-
encrypt your messages before making an API request to httpSMS and you
26-
also use the same key to decrypt the messages you receive from httpSMS
27-
via our
28-
<a href="https://docs.httpsms.com/webhooks/introduction"
24+
You setup an encryption key which you use to encrypt your messages
25+
before making an API request to httpSMS and you also use the same key
26+
to decrypt the messages you receive from httpSMS via our
27+
<a
28+
class="text-decoration-none"
29+
href="https://docs.httpsms.com/webhooks/introduction"
2930
>webhook events</a
3031
>. We are using the
31-
<a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard"
32+
<a
33+
class="text-decoration-none"
34+
href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard"
3235
>AES 265</a
3336
>
3437
encryption algorithm to encrypt and decrypt the messages.
@@ -73,22 +76,43 @@
7376
initialization vector and encoding the payload yourself.
7477
</p>
7578
<v-tabs v-model="selectedTab" show-arrows>
79+
<v-tab href="#javascript">
80+
<v-icon color="#efd81d" class="mr-1">{{
81+
mdiLanguageJavascript
82+
}}</v-icon>
83+
Javascript
84+
</v-tab>
7685
<v-tab href="#go">
77-
<v-icon color="#efd81d" class="mr-1">{{ mdiLanguageGo }}</v-icon>
86+
<v-icon color="#00aed8" class="mr-1">{{ mdiLanguageGo }}</v-icon>
7887
Go
7988
</v-tab>
8089
</v-tabs>
8190
<v-tabs-items v-model="selectedTab">
91+
<v-tab-item value="javascript">
92+
<pre v-highlight class="javascript w-full mb-n12">
93+
<code>import HttpSms from "httpsms"
94+
95+
const client = new HttpSms("" /* API Key from https://httpsms.com/settings */);
96+
97+
const key = "Password123";
98+
99+
const encryptedMessage = client.cipher.encrypt(key, "This is a sample text message");
100+
101+
// The encrypted message looks like this, note that you will get a different encrypted message when you run this code on your computer
102+
// Qk3XGN5+Ax38Ig01m4AqaP6Y0b0wYpCXtx59sU23uVLWUU/c7axF7LozDg==
103+
</code>
104+
</pre>
105+
</v-tab-item>
82106
<v-tab-item value="go">
83107
<pre v-highlight class="go w-full mb-n12">
84108
<code>import "github.com/NdoleStudio/httpsms-go"
85109

86-
client := htpsms.New(htpsms.WithAPIKey(/* API Key from https://httpsms.com/settings */))
110+
client := htpsms.New(htpsms.WithAPIKey(""/* API Key from https://httpsms.com/settings */))
87111

88112
key := "Password123" // use the same key on the Android app
89113
encryptedMessage := client.Cipher.Encrypt(key, "This is a test text message")
90114

91-
// The encrypted message looks like this
115+
// The encrypted message looks like this, note that you will get a different encrypted message when you run this code on your computer
92116
// Qk3XGN5+Ax38Ig01m4AqaP6Y0b0wYpCXtx59sU23uVLWUU/c7axF7LozDg==
93117
</code>
94118
</pre>
@@ -103,12 +127,33 @@ encryptedMessage := client.Cipher.Encrypt(key, "This is a test text message")
103127
the Android app before sending to your recipient.
104128
</p>
105129
<v-tabs v-model="selectedTab" show-arrows>
130+
<v-tab href="#javascript">
131+
<v-icon color="#efd81d" class="mr-1">{{
132+
mdiLanguageJavascript
133+
}}</v-icon>
134+
Javascript
135+
</v-tab>
106136
<v-tab href="#go">
107-
<v-icon color="#efd81d" class="mr-1">{{ mdiLanguageGo }}</v-icon>
137+
<v-icon color="#00aed8" class="mr-1">{{ mdiLanguageGo }}</v-icon>
108138
Go
109139
</v-tab>
110140
</v-tabs>
111141
<v-tabs-items v-model="selectedTab">
142+
<v-tab-item value="javascript">
143+
<pre v-highlight class="javascript w-full mb-n12">
144+
<code>import HttpSms from "httpsms"
145+
146+
client.messages.postSend({
147+
content: encryptedMessage,
148+
from: '+18005550199',
149+
encrypted: true,
150+
to: '+18005550100',
151+
})
152+
.then((message) => {
153+
console.log(message.id); // log the ID of the sent message
154+
});</code>
155+
</pre>
156+
</v-tab-item>
112157
<v-tab-item value="go">
113158
<pre v-highlight class="go w-full mb-n12">
114159
<code>import "github.com/NdoleStudio/httpsms-go"
@@ -149,12 +194,54 @@ client.Messages.Send(context.Background(), &httpsms.MessageSendParams{
149194
>
150195
</p>
151196
<v-tabs v-model="selectedTab" show-arrows>
197+
<v-tab href="#javascript">
198+
<v-icon color="#efd81d" class="mr-1">{{
199+
mdiLanguageJavascript
200+
}}</v-icon>
201+
Javascript
202+
</v-tab>
152203
<v-tab href="#go">
153-
<v-icon color="#efd81d" class="mr-1">{{ mdiLanguageGo }}</v-icon>
204+
<v-icon color="#00aed8" class="mr-1">{{ mdiLanguageGo }}</v-icon>
154205
Go
155206
</v-tab>
156207
</v-tabs>
157208
<v-tabs-items v-model="selectedTab">
209+
<v-tab-item value="javascript">
210+
<pre v-highlight class="javascript w-full mb-n12">
211+
<code>import HttpSms from "httpsms"
212+
213+
const client = new HttpSms("" /* API Key from https://httpsms.com/settings */);
214+
215+
// The payload in the webhook HTTP request looks like this
216+
/*
217+
{
218+
"specversion": "1.0",
219+
"id": "8dca3b0a-446a-4a5d-8d2a-95314926c4ed",
220+
"source": "/v1/messages/receive",
221+
"type": "message.phone.received",
222+
"datacontenttype": "application/json",
223+
"time": "2024-01-21T12:27:29.1605708Z",
224+
"data": {
225+
"message_id": "0681b838-4157-44bb-a4ea-721e40ee7ca7",
226+
"user_id": "XtABz6zdeFMoBLoltz6SREDvRSh2",
227+
"owner": "+37253920216",
228+
"encrypted": true,
229+
"contact": "+37253920216",
230+
"timestamp": "2024-01-21T12:27:17.949Z",
231+
"content": "bdmZ7n6JVf/ST+SoNlSaOGUL1DcL5705ETw8GAB4llYBgE9HOOL+Pu/h+w==",
232+
"sim": "SIM1"
233+
}
234+
}
235+
*/
236+
237+
const encryptedMessage = "bdmZ7n6JVf/ST+SoNlSaOGUL1DcL5705ETw8GAB4llYBgE9HOOL+Pu/h+w==" // get the encrypted message from the request payload
238+
const encryptionkey = "Password123" // use the same key on the Android app
239+
const decryptedMessage = client.cipher.decrypt(encryptionkey, encryptedMessage)
240+
241+
// This is a test text message
242+
</code>
243+
</pre>
244+
</v-tab-item>
158245
<v-tab-item value="go">
159246
<pre v-highlight class="go w-full mb-n12">
160247
<code>import "github.com/NdoleStudio/httpsms-go"
@@ -184,8 +271,8 @@ client := htpsms.New(htpsms.WithAPIKey(/* API Key from https://httpsms.com/setti
184271
*/
185272

186273
encryptedMessage = "bdmZ7n6JVf/ST+SoNlSaOGUL1DcL5705ETw8GAB4llYBgE9HOOL+Pu/h+w==" // get the encrypted message from the request payload
187-
key := "Password123" // use the same key on the Android app
188-
decryptedMessage := client.Cipher.Decrypt(key, encryptedMessage)
274+
encryptionkey := "Password123" // use the same key on the Android app
275+
decryptedMessage := client.Cipher.Decrypt(encryptionkey, encryptedMessage)
189276

190277
// This is a test text message
191278
</code>
@@ -213,15 +300,16 @@ decryptedMessage := client.Cipher.Decrypt(key, encryptedMessage)
213300
</template>
214301

215302
<script lang="ts">
216-
import { mdiLanguageGo, mdiTwitter } from '@mdi/js'
303+
import { mdiLanguageGo, mdiTwitter, mdiLanguageJavascript } from '@mdi/js'
217304
export default {
218305
name: 'EndToEndEncryptionToSmsMessages',
219306
layout: 'website',
220307
data() {
221308
return {
222309
mdiTwitter,
223310
mdiLanguageGo,
224-
selectedTab: 'go',
311+
mdiLanguageJavascript,
312+
selectedTab: 'javascript',
225313
authorImage: require('@/assets/img/arnold.png'),
226314
authorName: 'Acho Arnold',
227315
postDate: 'January 21, 2024',
@@ -244,7 +332,7 @@ export default {
244332
hid: 'og:description',
245333
property: 'og:description',
246334
content:
247-
'Configure your Android phone as an SMS gateway to automate sending text messages with the Python programing language.',
335+
'We have added support for end-to-end encryption for SMS messages so that no one can see the content of the messages you send using httpSMS except you.',
248336
},
249337
],
250338
}

web/pages/index.vue

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
Convert your Android phone into an SMS gateway.
2222
</h1>
2323
<h2 class="text--secondary text-h5 mt-8 mb-8">
24-
<b>Save money</b> by using your phone to send and receive SMS
25-
messages via a simple programmable API with end-to-end encryption.
24+
<span class="gradient-underline">Save money</span> by using your
25+
phone to send and receive SMS messages via a simple programmable API
26+
with end-to-end encryption.
2627
</h2>
2728
<div :class="{ 'text-center': $vuetify.breakpoint.mdAndDown }">
2829
<v-btn
@@ -260,11 +261,17 @@
260261
feature. Safeguard your messages from prying eyes, ensuring
261262
absolute confidentiality using the military grade
262263
<a
264+
class="text-decoration-none"
263265
href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard"
264266
>AES-256 encryption</a
265267
>
266268
algorithm.
267269
</h5>
270+
<v-btn
271+
to="/blog/end-to-end-encryption-to-sms-messages"
272+
class="primary"
273+
>Setup end-to-end encryption</v-btn
274+
>
268275
</div>
269276
</v-col>
270277
<v-col cols="12" md="6" :order-lg="1">
@@ -395,23 +402,18 @@
395402
<v-tabs-items v-model="selectedTab">
396403
<v-tab-item value="javascript">
397404
<pre v-highlight class="javascript w-full mt-n2 mb-n13">
398-
<code>let apiKey = "Get API Key from https://httpsms.com/settings";
405+
<code>import HttpSms from 'httpsms'
406+
407+
const client = new HttpSms('' /* Get the API Key from https://httpsms.com/settings */);
399408

400-
fetch('https://api.httpsms.com/v1/messages/send', {
401-
method: 'POST',
402-
headers: {
403-
'x-api-key': apiKey,
404-
'Accept': 'application/json',
405-
'Content-Type': 'application/json'
406-
},
407-
body: JSON.stringify({
408-
"content": "This is a sample text message",
409-
"from": "+18005550199",
410-
"to": "+18005550100"
411-
})
409+
client.messages.postSend({
410+
content: 'This is a sample text message',
411+
from: '+18005550199', // Put the correct phone number here
412+
to: '+18005550100', // Put the correct phone number here
413+
})
414+
.then((message) => {
415+
console.log(message.id); // log the ID of the sent message
412416
})
413-
.then(res => res.json())
414-
.then((data) => console.log(data));
415417
</code>
416418
</pre>
417419
</v-tab-item>
@@ -611,7 +613,7 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
611613
<v-icon color="primary" class="mt-n1" left>{{
612614
mdiCheckCircle
613615
}}</v-icon
614-
>Forward received messages to your server
616+
>Forward received messages via webhook
615617
</p>
616618
<p class="subtitle-1 mt-n4">
617619
<v-icon color="primary" class="mt-n1" left>{{
@@ -660,13 +662,13 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
660662
<v-icon color="primary" class="mt-n1" left>{{
661663
mdiCheckCircle
662664
}}</v-icon
663-
>Forward received messages to your server
665+
>Forward received messages via webhook
664666
</p>
665667
<p class="subtitle-1 mt-n4">
666668
<v-icon color="primary" class="mt-n1" left>{{
667669
mdiCheckCircle
668670
}}</v-icon
669-
>Priority email support
671+
>Priority support
670672
</p>
671673
</v-card-text>
672674
</v-card>
@@ -708,13 +710,13 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
708710
<v-icon color="primary" class="mt-n1" left>{{
709711
mdiCheckCircle
710712
}}</v-icon
711-
>Forward received messages to your server
713+
>Forward received messages via webhook
712714
</p>
713715
<p class="subtitle-1 mt-n4">
714716
<v-icon color="primary" class="mt-n1" left>{{
715717
mdiCheckCircle
716718
}}</v-icon
717-
>Priority email support
719+
>Priority support
718720
</p>
719721
</v-card-text>
720722
</v-card>
@@ -858,15 +860,6 @@ export default Vue.extend({
858860
substackLoaded: false,
859861
}
860862
},
861-
mounted() {
862-
setTimeout(() => {
863-
const s = document.createElement('script')
864-
s.type = 'text/javascript'
865-
s.src = 'https://substackapi.com/widget.js'
866-
document.getElementsByTagName('head')[0].appendChild(s)
867-
this.substackLoaded = true
868-
}, 5000)
869-
},
870863
})
871864
</script>
872865

@@ -890,4 +883,8 @@ export default Vue.extend({
890883
-webkit-background-clip: text;
891884
-webkit-text-fill-color: transparent;
892885
}
886+
887+
.gradient-underline {
888+
color: white;
889+
}
893890
</style>

0 commit comments

Comments
 (0)