I just install the Check Point API Python Development Kit and run a simple login. But it says "You don't have permission to access /web_api/login this server.
How could I troubleshoot the issue?
Code:
import getpass
from cpapi import APIClient, APIClientArgs
api_server = "fwmgr"
username = input("Enter username: ")
password = getpass.getpass("Enter password: ")
client_args = APIClientArgs(server=api_server)
client = APIClient(client_args)
client.debug_file = "api_calls.json"
login_res = client.login(username, password)
login_res.error_message
Error message returned:
cpapi.api_exceptions.APIException('APIResponse received a response which is not a valid JSON.',
b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>403 Forbidden</title>\n</head><body>\n<h1>Forbidden</h1>\n<p>You don\'t have permission to access /web_api/login\non this server.<br />\n</p>\n</body></html>\n')