https://supertokens.com/ logo
Title
j

Jonatan Vieira

12/16/2022, 11:35 AM
not receiving email after requesting code in the API
Hello i'm doing a backend graphQL with Nestjs with passwordless after requesting the endpoint
/recipe/signinup/code
i'm not receiving the email nor phone with the code, any aditional endpoint or option to send the verification to inserted email or phone number? i've checked in your example with "npx create-supertokens-app@latest --recipe=passwordless" i receive the email using the same api URL...
n

nkshah2

12/16/2022, 11:37 AM
Hi @Jonatan Vieira , Enable debug logs in the backend and send the output here please
j

Jonatan Vieira

12/16/2022, 11:41 AM
There is no errors the request does it all without errors, just no email i'm not using the SDK just API requests
n

nkshah2

12/16/2022, 11:41 AM
Are you sending requests to SuperTokens core directly?
Or to the backend layer that uses the SuperTokens middleware?
j

Jonatan Vieira

12/16/2022, 11:44 AM
no, does this request
curl --location --request POST 'https://dev-946fc9117a3611ed8d14aff7a53db0a4-eu-west-1.aws.supertokens.io:3573/recipe/signinup/code' \
--header 'api-key: XXXXXXXXXXXXX' \
--header 'cdi-version: 2.16' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "jonatan.vieira@email.dk",


}'
n

nkshah2

12/16/2022, 11:45 AM
Right so the backend SDK handles sending emails not the core
To use email/SMS sending you would have to use the SDK on your backend
j

Jonatan Vieira

12/16/2022, 11:46 AM
Any guide with NestJs with GraphQL i can follow ?
n

nkshah2

12/16/2022, 11:46 AM
We have guides for NestJS separately and GraphQL, you can refer to those
If you have any issues setting it up feel free to ask questions on Discord and we can help
j

Jonatan Vieira

12/16/2022, 11:50 AM
n

nkshah2

12/16/2022, 11:51 AM
Yep we are still working on a proper example/docs for this, in the meantime you can refer to the two individual guides for NestJS and GraphQL to see if you can get it set up
j

Jonatan Vieira

12/16/2022, 11:52 AM
i've tried it didn't help..
n

nkshah2

12/16/2022, 11:54 AM
Maybe @porcellus can help here, explain the issue you were facing please because otherwise its hard to help
j

Jonatan Vieira

12/16/2022, 11:57 AM
with GraphqL API how one exposes the auth endpoints (/code, /consume ) using the SDK ?
your guide refers to sessionVerification
p

porcellus

12/16/2022, 11:58 AM
hi
j

Jonatan Vieira

12/16/2022, 11:58 AM
Hi @porcellus 🙂
p

porcellus

12/16/2022, 11:59 AM
just to clear things up: do you want to expose the /code and /consume auth endpoints as graphql mutations?
(I mean that's what I got from your last message)
j

Jonatan Vieira

12/16/2022, 12:00 PM
yes, ive done that and in each of these mutations i'm doing request to SuperToken API
on the "code" mutation i'm requesting the code with a curl similar to https://discord.com/channels/603466164219281420/1053274201085186078/1053276486796328970
n

nkshah2

12/16/2022, 12:01 PM
Instead of querying the core directly, you could use the functions exposed by the supertokens-node sdk
j

Jonatan Vieira

12/16/2022, 12:02 PM
any place i check those fuctions/methods?
or any guide i follow to be able to use those functions?
n

nkshah2

12/16/2022, 12:04 PM
You can use the sdk reference docs: https://supertokens.com/docs/nodejs
p

porcellus

12/16/2022, 12:04 PM
j

Jonatan Vieira

12/16/2022, 12:06 PM
thanks will look into it