Cloud Authentication from Browser (Client Side)
AnsweredI'm attempting to retrieve an access token from my cloud user to display all system devices. I'm doing this by sending a request to the URL https://nxvms.com/cdb/oauth2/token
with the following request body:
{
"grant_type": "password",
"response_type": "token",
"client_id": "3rdParty",
"scope": "cloudSystemId=af2cb938-48b9-40d1-b4f1-3da5b713a5ae",
"username": "cloud_username",
"password": "cloud_password"
}
However, I consistently encounter a CORS error. I've examined the documentation and couldn't find an alternative, non-deprecated method to establish a cloud session and obtain an access token.
-
Official comment
Hi Ilie,
As mentioned in the article below, browser based requests will not work due to CORS.
Here are some additional article to help get your access token. If these do not work, or this is not your use case, please let me know and elaborate so I can best assist.
https://support.networkoptix.com/hc/en-us/articles/7771731535767-Authorizing-a-Web-App
https://support.networkoptix.com/hc/en-us/articles/7771731504023-API-Spec
Comment actions
Please sign in to leave a comment.
Comments
1 comment