Error "Unable to connect to the server. Please check your network connection" when Calling api/v1/sessions/me
Last Updated:
Overview
While calling the api/v1/sessions/me endpoint, the following error is being returned:
Unable to connect to the server. Please check your network connection.
Applies To
- OpenID
- Cross-Origin Resource Sharing (CORS)
- Developer
- Okta Classic Engine
Cause
Solution
Add the URL that is calling /api/v1/sessions/me as a Trusted Origin for CORS in Okta. To do that:
- Go to the Okta Admin UI > Security > API > Trusted Origins > Add Origin.
- Add https://www.example.com and enable Cross-Origin Resource Sharing (CORS).
