Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum

thanks. my stupid error by putting comments in .env file

Help needed:
I'm tying out python sdk 'from casdoor import CasdoorSDK', after initiate the sdk instance, I can get token successfully with the sdk:
# tried both Resource Owner Password Credentials Grant and Client Credentials Grant
token = , password=
# token = ***
token = ***
access_token = ***"access_token")
However, when I try to get the users or enforcers in my application (I have the application name setup correctly when initiate the sdk instance) , it only return empty list [].
enforcers = self.sdk.get_enforcers()
users=self.sdk.get_users()

I've check the test code, https://github.com/casdoor/casdoor-python-sdk/blob/master/src/tests/test_enforcer.py doesn't seem different from what I've done.

What steps could be missing?


By the way, I'm using literal string for the certificate parameter, the document here showing a byte string which will result in an error:
https://github.com/casdoor/casdoor-python-sdk?tab=readme-ov-file
certificate = b'''-----BEGIN CERTIFICATE----- MIIE+TCCAuGgAwIBAgIDAeJAMA0GCSqGSIb3DQEBCwUAMDYxHTAbBgNVBAoTFENh ... -----END CERTIFICATE-----'''

Help: what is this API key used for? Can I use it for machine to machine authentication?

image.png