Connection Issue using pyTigerGraph in Jupyter Notebook (Python)


I have a connection issue when I tried to connect Tiger Graph using pyTigerGraph in Jupyter Notebook. The secret I am using is the one created in AdminPortal. However, after I run the getToken(), the error occurs Please check the details in the following screenshot.

Waiting for your response.


@ydeng I don’t see anything obvious in the code error output. Can you verify that it’s passing the secret string correctly?

I’ve included some sample code to test connection request as well:

pip install pyTigerGraph

import pyTigerGraph as tg

Domain = ""

Graph = "mycloudsolution"

Secret = "5gu4beflq2vbq62djcco7dn4jt6cqvgm"

conn = tg.TigerGraphConnection(host=Domain, graphname=Graph, gsqlSecret=Secret)

authToken = conn.getToken(Secret)

authToken = authToken[0]



Sample notebook to test code:

1 Like

Hi Jon,

I just tried the sample code; however, I also got the error message. Please check the following screenshot for the details.


@ydeng Did you change the parameters for your solution? The credentials in that example belong to an old box I was connected to and was terminated. (If you run “as-is” you will get an error)

Domain =
Graph =
Secret =

Update the parameters to match your solution information. If you need help on anything let me know. If it’s your first time generating a secret you will navigate to Tools > Admin Portal > Management > Users

Hi Jon,

I update the parameters with my solution; however, the same error occurs again. Please check the following screetshots for the details.


Hi Jon,

Please check the error message after updating the parameters.


Hi @ydeng,

Did you try executing the code in the Google Colab with your credentials? Did you run into any errors while using the Google Colab to test the connection?

Other pyTigerGraph users have experienced issues on Windows. Are you trying to run the notebook locally on a Windows machine?

We host weekly office hour sessions (TigerGraph Graphe) in Discord on Tuesdays @ 7:30am PST. Feel free to join, and we can help out there as well. :grinning:

Hi @Liz_Anaya,

I tried to use Google Colab to run the code with my credentials and I am able to get the token now. However, I have another connection issue when I tried to connect with localhost (TigerGraph Desktop)? I am using the similar setup @Jon_Herke provides and change the domain to “”.


@ydeng for the domain the port is handled through pyTigerGraph. Could you try changing the Domain to or depending on your security configurations?

@Jon_Herke I’ve tried to use both or as the Domain; however, I still got the error message. I notice that there are 2 types of Security, LDAP and SSO. And I was trying to use SSO. Is there anything I should pay attention to set up the SSO in AdminPortal?

I also tried to disable the security and use the domain you provide; however, the error message showed again.

@ydeng Do you have some free time today? Maybe we can jump into a Virtual Room on Discord. Once we discover the resolution we can post the resolution steps here.

Discord Link → TigerGraph

@Jon_Herke Sorry for missing your message. I didn’t check my email during the weekend.

I think the connection issue could be the wrong host name. Could you help me to find the host name for the TigerGraph Enterprise Free Edition?