Title
d

dorian

09/12/2017, 7:47 PM
there is no call to their api in my code
a

agartha

09/12/2017, 7:56 PM
The auth0 you see in the error has nothing to do with Auth0 authentication, it's the location where your function webtask is running (using Auth0 Extend). The error indicates a syntax error in your function. Can you share your function code?
d

dorian

09/12/2017, 8:11 PM
thanks for the quick answer, my code is:
const fetch = require('isomorphic-fetch') const Base64 = require('Base64') const FormData = require('form-data') const apiKey = 'api:key-XX’ const url = 'https://api.mailgun.net/v3/XX/messages' module.exports = function (event) { const {email, nume, confirmToken} = event.data.User.node if (!confirmToken) { console.error('No token') return } const prenume = nume.split(' ')[0] const form = new FormData() form.append('from', ‘XX <salut@XX.xo>') form.append('to',
${nume} <${email}>
) form.append('subject', 'Contul tău') form.append('text',
<h1>Salut, ${prenume}!</h1><p>Îți mulțumim că ai ales să încerci aplicația XX. Apasă pe butonul de confirmare pentru a-ți confirma e-mail-ul.</p><p><a href="https://app.xx.xo/confirma?id=${confirmToken}">Confirm!<a></p>
) try { fetch(url, { headers: { 'Authorization':
Basic ${Base64.btoa(apiKey)}
}, method: 'POST', body: form }) } catch (e) { console.error(e) } }
and it definitely worked before 🙂
strings are quoted accurately, Slack did some overwrites, I couldn't paste as snippet inside the thread
a

agartha

09/12/2017, 8:14 PM
Can you send it in a PM?
d

dorian

09/12/2017, 8:15 PM
sure, thanks
a

agartha

09/12/2017, 8:21 PM
For reference,
'use latest'
was missing.
👍🏼 1