Skip to content

Fix example script using literal placeholder instead of real client ID#2

Open
fiveinchpixie wants to merge 1 commit intoPlexTrac-Labs:mainfrom
fiveinchpixie:fix/placeholder-client-id-example
Open

Fix example script using literal placeholder instead of real client ID#2
fiveinchpixie wants to merge 1 commit intoPlexTrac-Labs:mainfrom
fiveinchpixie:fix/placeholder-client-id-example

Conversation

@fiveinchpixie
Copy link
Copy Markdown

Fix example script using literal placeholder instead of real client ID

The example in main.py was using the literal string "<id_of_client>" as the client ID, causing 403 Forbidden errors ("User does not have access to client NaN").

Changes:

  • Replace hardcoded placeholder with logic to read client_id from config or list clients and use the first accessible one
  • Add optional client_id to config.yaml template
  • Document client_id in README
  • Fix PTWrapperLibraryResponse usage: use status_code and .json attribute instead of .ok and .json() method

- Replace hardcoded '<id_of_client>' with logic to read from config or
  list clients and use the first accessible one
- Add optional client_id to config.yaml template
- Document client_id in README
- Fix PTWrapperLibraryResponse usage: use status_code and .json attribute
  instead of .ok and .json() method

Made-with: Cursor
@fiveinchpixie
Copy link
Copy Markdown
Author

I was having some issues with the auth, so I decided to share the fix.

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.

1 participant