hi, i have a question. When should I add a coreAPI...
# support-questions-legacy
k
hi, i have a question. When should I add a coreAPI key? I'm having a problem right now where it works fine in local production mode, but not in the production environment. I am wondering if this is due to the fact that the domain has changed. Is there any rule that only one API key can be associated with one domain?
r
Hey @kazumo
You should add a coreApi key when you are replying to prod and the core instance is accessible via the internet as well
What’s the error that you are facing?
k
I am developing with nextjs and nestjs. On the front end, emailPasswordSignUp(), emailPasswordSignIn(), getAuthorisationURLWithQueryParams(), and emailPasswordSignIn(), getAuthorisationURLWithQueryParamsAndSetState() APIs on the front end and it works fine. However, in verifySession() in useGuard when I send a request to the backend, I get the following error
Copy code
SessionError: Session does not exist. Are you sending the session tokens in the request as cookies?
{
  type: 'UNAUTHORISED',
  payload: { clearCookies: false },
  errMagic: 'ndskajfasndlfkj435234krjdsa',
  fromRecipe: 'session'
 }
r
right. This means that the session tokens are not being sent to the backend. Whats the URL of the api you are querying? And also whats the configured
apiDomain
on the frontend?
k
URL of the api is https://api.persa.cloud/graphql and, the configured apiDomain on the frontend is https://persa.cloud
Must they be the same?
r
They do need to be the same, yes.