Skip to content
← Back to Community
[repl.email] Public API v1 and python library - send emails from @repl.email through the api
Profile icon
MarcusWeinberger

Welcome! I am happy to announce the initial release of repl.email API v1

View this project on PyPi, or look at this demo repl to see usage examples (python).

Get your API key here

Authentication

For every request, your username and api token must be included in the headers. Here's how to do it in cURL:

curl -H "user: MarcusWeinberger" -H "token: xxxx-xxxx-xxxx-xxxx"

All API requests must be POST, and data should be sent as JSON.

Voters
Profile icon
hkatzdev
Profile icon
Leroy01010
Profile icon
rafrafraf
Profile icon
adl212
Profile icon
StringentDev
Profile icon
DynamicSquid
Profile icon
MarcusWeinberger
Comments
hotnewtop
Profile icon
DynamicSquid

Cool!

Profile icon
VivaanSa
Traceback (most recent call last): File "main.py", line 62, in <module> res = client.send(to, subj, text=text) File "/opt/virtualenvs/python3/lib/python3.8/site-packages/replemail/__init__.py", line 35, in send return self._call('/send', data={ File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/models.py", line 898, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 
Profile icon
MarcusWeinberger

@VivaanSa what command did you run?

Profile icon
VivaanSa
Profile icon
MarcusWeinberger

@VivaanSa yes but with what arguments (remove any confidential information)

Profile icon
VivaanSa

@MarcusWeinberger
name: @VivaanSa
API key: f149bd30-d34b-4278-b5c2-725f6cc2ca35
to: ******@gmail.com
subject: hello
text: hi

Profile icon
adl212

Cool! This will definitely be useful for me!

Profile icon
MarcusWeinberger
Profile icon
StringentDev

are you able to create a js version for it, python is tricky to deal with in electron when you need to get info back plus you will need to use argparse. @MarcusWeinberger

Profile icon
StringentDev

haha, get your keys here... can't login anymore... @MarcusWeinberger

Profile icon
StringentDev

ahh. there is a DOM error:

authWithReplco.js:1 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://repl.email') does not match the recipient window's origin ('https://repl.it'). onLoad @ authWithReplco.js:1

@MarcusWeinberger