hi @cryptokid,
I have not getting current user’s objectId using fetch and axios request in cloud function using below code.
request.user.id
Its only working using Moralis.Cloud.run
.
hi @cryptokid,
I have not getting current user’s objectId using fetch and axios request in cloud function using below code.
request.user.id
Its only working using Moralis.Cloud.run
.
can you rephrase the question? what doesn’t work, in what context?
did you try logger.info(JSON.stringify(request))
?
when i try to call cloud function using Moralis.Cloud.run
i have get current login user’s id using request.user.id
.
But when i try to call same cloud function using fetch or Axios request then request.user.id
its value undefined.
you can look in network tab for when Moralis.Cloud.run is used to see what other parameters you have to provide when using fetch or axios
Yes , I have already check that.
I have notice that when i have use ‘Moralis.Cloud.run’ then automatic _ApplicationId and _SessionToken added in param.
So when i call cloud function using fetch request then we need to pass parameters like _ApplicationId and _SessionToken?
yes, you have to pass that _SessionToken in order to identify the user