https://supertokens.com/ logo
Title
j

JuanJo

11/07/2022, 10:20 PM
Hi, I followed the nestjs setup guide and when I went to auth/dashboard it showed a server error. Nest app shows this error: SuperTokens core threw an error for a GET request to path: '/apiversion' with status code: 401 and message: Invalid API key. The connection uri and api key in nest are the ones provided in the managed service, I don't know what could be wrong.
r

rp

11/08/2022, 5:21 AM
hey @JuanJo
can you try the connectionURI as
https://try.supertokens.com
and see if that works?
j

JuanJo

11/09/2022, 2:14 AM
yes it works
r

rp

11/09/2022, 4:10 AM
Have you added the
apiKey
config when using the managed service connectionURI?
j

JuanJo

11/14/2022, 3:15 AM
yes
also tried creating new api key and it does not work
I made sure the api key and connection uri are well written
r

rp

11/14/2022, 5:37 AM
hmm. This is unusual. Can you trying querying the /hello path from your browser? What do you get?
j

JuanJo

11/15/2022, 1:44 AM
it works
r

rp

11/15/2022, 3:49 AM
Oh right. I see. So you need to find the place where supertokens.init is being called. And in there, you will see the connectionURI being used inside supertokens.init({supertokens:{…}})
You need to add the api key in there along side where the connection uri is being used