46elks @ PyCon 2021

If you want to integrate telephony  📞 in your projects, we can help with that!

PyCon

Hi Pythonistas! You'll get 200 SEK when you register an account with 46elks with the link on this page!

curl https://api.46elks.com/a1/sms \
  -u API_USERNAME:API_PASSWORD \
  -d to=+46766861004 \
  -d message="Hi Pythonistas! You'll get 200 SEK when you register an account with 46elks with the link on this page!" \
  -d from=PyCon
$sms = array(
  "to"      => "+46766861004",
  "message" => "Hi Pythonistas! You'll get 200 SEK when you register an account with 46elks with the link on this page!",
  "from"    => "PyCon"
);

$USER = "API_USERNAME";
$PASS = "API_PASSWORD";

$url  = "https://api.46elks.com/a1/sms";
$auth = 'Authorization: Basic '.
base64_encode($USER.':'.$PASS)."\r\n".
"Content-type: application/x-www-form-urlencoded\r\n";

$context = stream_context_create(array(
  'http' => array(
    'method' => 'POST',
    'header'  => $auth,
    'content' => http_build_query($sms),
    'timeout' => 10
)));

file_get_contents($url, false, $context);
import requests

requests.post('https://api.46elks.com/a1/sms',
  auth = ('API_USERNAME', 'API_PASSWORD'),
  data = {
    'to':      '+46766861004',
    'message': "Hi Pythonistas! You'll get 200 SEK when you register an account with 46elks with the link on this page!",
    'from':    'PyCon'
  }
)
const https = require('https')
const querystring = require('querystring')

const username = 'API-username'
const password = 'API-password'
const auth_str = username + ':' + password
const postFields = {
  to:      "+46766861004",
  message: "Hi Pythonistas! You'll get 200 SEK when you register an account with 46elks with the link on this page!",
  from:    "PyCon",
}

const key = new Buffer(auth_str).toString('base64')
const postData = querystring.stringify(postFields)

const options = {
  hostname: 'api.46elks.com',
  path:     '/a1/SMS',
  method:   'POST',
  headers:  {
    'Authorization': 'Basic ' + key
  }
}

const callback = (response) => {
  var result = ''
  response.on('data', (chunk) => {
    result += chunk
  })

  response.on('end', () => {
    console.log(result)
  })
}

var request = https.request(options, callback)
request.write(postData)
request.end()

Curious to try?

Create your account and get started straight away

Create account

As a fellow Pythonista you'll get 200SEK to play around with ✌🏽

Are you one of the 20 first to register an account you'll also get a telephone number
that you can use for SMS and telephone calls for 1 year

So, what can you do?

SMS

Telephony

Virtual numbers

Integrate with external systems

This and much more is possible with 46elks!

You'll find a number of different code examples on Github 🚀

Maybe you'd like to dive in to our documentation.


Do you have any questions?
Please call us on +4676-686 10 04 or send an email to hello@46elks.com.