Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get baseURL from ou_code in bearer token #548

Merged
merged 3 commits into from
Feb 4, 2024
Merged

Conversation

RichieB2B
Copy link

As discussed in #546. We can get the Fleet URL from the bearer token instead of specifying it in the settings.

This needs testing before merging!

@RichieB2B
Copy link
Author

RichieB2B commented Jan 24, 2024

@ngardiner I have tested this code now for using FleetAPI Europe and Owner API tokens. Please test for FleetAPI NA tokens. After that we can merge it.

PS: Owner API tokens still work with this patch because of 4b1767f

@alexeiw123
Copy link

alexeiw123 commented Feb 5, 2024

I've just pulled this update to test at home and I can no longer access the twcmanager interface.

~/TWCManager $ sudo -u twcmanager python -m TWCManager
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/TWCManager/TWCManager.py", line 34, in <module>
    import TWCManager.TWCManager
  File "/home/pi/TWCManager/lib/TWCManager/TWCManager.py", line 636, in <module>
    master.loadSettings()
  File "/home/pi/TWCManager/lib/TWCManager/TWCMaster.py", line 774, in loadSettings
    carapi.setCarApiBearerToken(self.settings.get("carApiBearerToken", ""))
AttributeError: 'NoneType' object has no attribute 'setCarApiBearerToken'

This seems related to this change, if not let me know and I'll create it's own issue.
Edit: Actually I'll go ahead an create an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants