Hi I am not able to get token using getToken command in TigerGraph. The python script is keep on running and not giving me the token.
@ranojitsingh Is it generating any errors? Is there a screenshot or additional information you can share to help us resolve the issue?
@Jon_Herke I am not getting any error. But the script is keep on running only for infinite time, and eventually I need to stop the script. Below is the script I am using for connecting
conn = tg.TigerGraphConnection(
host=‘http://localhost’,
graphname = ‘MyGraph’,
username=‘tigergraph’,
password=‘tigergraph’)
secret = conn.createSecret()
token = conn.getToken(secret)
print(token)
The line which is keep on running is “token = conn.getToken(secret)”, secret token is getting generated in TigerGraph Admin portal
@ranojitsingh Here are a few steps you can take to troubleshoot the issue:
-
Check Connection Parameters: Ensure that the connection parameters such as
host
,graphname
,username
, andpassword
are correctly set to match your TigerGraph instance. -
Verify Secret Creation: Double-check that the
createSecret()
method is successfully generating a secret. You can print thesecret
variable to ensure that it’s not empty. - Verify Token Generation: If you have access to the TigerGraph Admin portal, you can manually verify that the secret you generated corresponds to a valid application token. Ensure that the secret has the necessary privileges to access the specified graph