You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However so I can't get it to work. Trying to connect 2 legged I get the below error.
I'm not sure what the callback url should be.....http://localhost:8080 ??
Here's what I'm trying:
from forge import ForgeApp # noqa:E402
2-legged context - Needed for methods that use the BIM 360 API
#############################################################################
C:\python>python get_project.py
Traceback (most recent call last):
File "C:\python\get_project.py", line 20, in
app.get_hubs()
^^^
NameError: name 'app' is not defined
C:\python>python get_project.py
2024-04-04 16:11:58 (UTC/GMT +0200) (forge.auth): INFO - Authorized Forge App
Traceback (most recent call last):
File "C:\python\get_project.py", line 27, in
app = ForgeApp(
^^^^^^^^^
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\forge.py", line 65, in init
self.hub_id = hub_id or os.environ.get("FORGE_HUB_ID")
^^^^^^^^^^^
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\forge.py", line 86, in hub_id
self._set_hub_id(val)
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\base.py", line 256, in _set_hub_id
raise ValueError("Invalid Hub ID")
ValueError: Invalid Hub ID
C:\python>python get_project.py
Traceback (most recent call last):
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\auth.py", line 214, in _set_auth_header
self.token_type, self.access_token
^^^^^^^^^^^^^^^
AttributeError: 'ForgeAuth' object has no attribute 'token_type'
During handling of the above exception, another exception occurred:
#############################################################################
The text was updated successfully, but these errors were encountered:
Hi There,
Your module looks impressive!
However so I can't get it to work. Trying to connect 2 legged I get the below error.
I'm not sure what the callback url should be.....http://localhost:8080 ??
Here's what I'm trying:
from forge import ForgeApp # noqa:E402
2-legged context - Needed for methods that use the BIM 360 API
app = ForgeApp(
client_id="b.zzzzzzzzzzz",
client_secret="yyyyyyyyyyy",
hub_id="cf5307ae-78a7-435e-b77c-cef643b38e67",
)
app.get_users()
admin_user = app.find_user("admin_user@domain.com")
normal_user_1 = app.find_user("other_user_1@domain.com")
normal_user_2 = app.find_user("other_user_2@domain.com")
#############################################################################
C:\python>python get_project.py
Traceback (most recent call last):
File "C:\python\get_project.py", line 20, in
app.get_hubs()
^^^
NameError: name 'app' is not defined
C:\python>python get_project.py
2024-04-04 16:11:58 (UTC/GMT +0200) (forge.auth): INFO - Authorized Forge App
Traceback (most recent call last):
File "C:\python\get_project.py", line 27, in
app = ForgeApp(
^^^^^^^^^
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\forge.py", line 65, in init
self.hub_id = hub_id or os.environ.get("FORGE_HUB_ID")
^^^^^^^^^^^
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\forge.py", line 86, in hub_id
self._set_hub_id(val)
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\base.py", line 256, in _set_hub_id
raise ValueError("Invalid Hub ID")
ValueError: Invalid Hub ID
C:\python>python get_project.py
Traceback (most recent call last):
File "C:\Users\rolan\AppData\Local\Programs\Python\Python312\Lib\site-packages\forge\auth.py", line 214, in _set_auth_header
self.token_type, self.access_token
^^^^^^^^^^^^^^^
AttributeError: 'ForgeAuth' object has no attribute 'token_type'
During handling of the above exception, another exception occurred:
#############################################################################
The text was updated successfully, but these errors were encountered: