Authentication API

 avatar
user_7886995
html
2 years ago
1.2 kB
4
Indexable
Never
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>TEST HTML</title>
</head>

<body>

    <button id="test_button">TEST BUTTON</button>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
        fetch(
            "https://binhdo-novobi-binhodoo16-15-0-6274007.dev.odoo.com/web/session/portal_authenticate",
            {
                method: "POST",
                headers: {
                    "Accept": "application/json",
                    "Content-Type": "application/json",
                    // "credentials": "include",
                },
                body: JSON.stringify({
                    jsonrpc: "2.0",
                    params: {
                        db: "binhdo-novobi-binhodoo16-15-0-6274007",
                        login: "user",
                        password: "user",
                    },
                }),
            }
        ).then(function (response) {
            console.log(response)
        });

        $('#test_button').click(function() {
            
        });

    </script>
</body>
</html>