Authentication API: Address, endpoints and documents

Welcome to Portals United! / Forums / Troubleshooting / Authentication API: Address, endpoints and documents

  • Author
    Posts
  • April 10, 2025 at 1:03 pm #1447

    Hello everyone,

    I have developed a 3D package and I want to integrate it in the XR4Ed platform. I want to use the authentication service of xr4ed platform, but I can not find any related documents showing me the address of the API endpoints, documentation,s etc.

    I will really appreciate any prompt help.

    Regards

    April 10, 2025 at 5:32 pm #1449

    The endpoints are described here. Please refer to Cellock for more information. You might think you have to write your own Login Plugin, but this plugin type is only meant to be used by the WB. If you want your project to call the XR4ED API, then you can theoretically use our WebRequest Node and JSON node to interact with the Backend from Cellock. It is still complicated but doable with some experience.

    Does this answer your question?

    April 11, 2025 at 2:38 pm #1457

    Thanks so much for the answer. At the first step, we look for authentication APIs and endpoints, that I could not find there.
    Are they somewhere else? a separate service?

    Also, where can I find more information about your WebRequest Node and JSON node?
    Thanks in advance for your help.

    April 13, 2025 at 11:24 am #1458

    You POST a message like this

    
    private class LoginSendMessage
    {
    public string email;
    public string password;
    }
    

    or rather

    
    {
    "email": "your shop email address",
    "password": "your shop password"
    }
    

    (serialized as a JSON string) to "https://xr4ed.cellock.com/micro_auth/oauth/login". Then you should receive a JSON-encoded message like this

    
    private class ResponseData
    {
    public string accessToken;
    public string refreshToken;
    public UserData data;
    }
    

    or rather

    
    {
    "accessToken": "SOME STRING VALUE",
    "refreshToken": "another string value",
    "UserData": something else which you don't need
    }
    

    which you need to deserialize to get to the accessToken.

    Regarding the WebRequest node, you input a string (text node) "Content-Type: application/json" into the header input and the JSON file with your email and password into the Payload input, put the above mentioned URL into the text input field in the node to send the request.

    The result (a json-encoded) string comes out of the Value output in case of success. Then, you use a JSON node to extract the token which you then store into a signal variable. The string to extract the token from the json string in the JSON node is “.accessToken”.

    That should get you started.

  • You must be logged in to reply to this topic.