Hello, I am trying to call `SuperTokens.consumeCo...
# support-questions
c
Hello, I am trying to call
SuperTokens.consumeCode()
but I get
consumeCode is not a function
Is there a difference with calling
/signinup/code/consume
directly? Because this works.
r
Hey! How are you importing?
Hey! How are you importing?
c
> import SuperTokens from 'supertokens-website'; > SuperTokens.consumeCode() Is there a special way to import it?
r
oh right. So this function is not available in the supertokens-website SDK. This SDK is only useful for session management.
So you will have to make the API call using
axios
or
fetch
.
c
Is this not the reference for supertokens-website? > https://supertokens.com/docs/web-js/modules.html
r
no. this is another SDK -> supertokens-web-js
you can use that instead of supertokens-website, but we haven't added any docs for it yet
Once we add docs for it, then you no longer need to use supertokens-website since that will be a part of the supertokens-web-js SDK.
c
ok thanks
r
i mean you can use the supertokens-web-js SDK if you like.
but you might find it a little difficult given that there are no docs for it yet.
c
Yes I understand.
3 Views