https://supertokens.com/ logo
a

alisha

05/26/2022, 10:26 AM
hey, I am facing this error while calling /signout API
r

rp

05/26/2022, 10:26 AM
hey!
what's the error?
a

alisha

05/26/2022, 10:27 AM
Copy code
{
  "message": "try refresh token"
}
r

rp

05/26/2022, 10:27 AM
can you enable debug logs and show me the output?
Also, how are you calling the sign out API? via postman / frontend app?
a

alisha

05/26/2022, 10:27 AM
via postman
r

rp

05/26/2022, 10:27 AM
right. So this error means the access token has expired
a

alisha

05/26/2022, 10:27 AM
Copy code
com.supertokens {t: "2022-05-26T15:55:15+05:30", message: "getSession: Returning try refresh token because access token from cookies is nil", file: "/home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.2/recipe/session/api/implementation.go:54" sdkVer: "0.6.2"}
r

rp

05/26/2022, 10:27 AM
so you need to refresh the access token and then call this API again
so you need to refresh the access token and then call this API again
a

alisha

05/26/2022, 10:28 AM
Copy code
curl --location --request POST 'http://localhost:9000/auth/v1/signout' \
--header 'Cookie: sIdRefreshToken=f2ced83c-3aaa-4e0e-b9e1-769d4dc0fe67'
r

rp

05/26/2022, 10:28 AM
You also need to add the access token to the request
which you can get if you call the refresh API with the refresh token
a

alisha

05/26/2022, 10:29 AM
oh ok, trying
r

rp

05/26/2022, 10:29 AM
on the frontend, the refresh would have happened automatically.
Since you are using postman, you need to do it manually
a

alisha

05/26/2022, 10:32 AM
worked - thanks 🙂