labkey python api access via netrc on a custom authenticated instance

LabKey Support Forum (Inactive)
labkey python api access via netrc on a custom authenticated instance mohara  2024-11-15 14:15
Status: Active
 

Hi Vipin:

With the Community Edition, only our default database authentication is supported, so on this forum we can't help with what sounds like a more layered redirect scenario. It's also not clear to me what "example python api access" you are using from the above traceback, so I'd start simpler:

Generally, the first step with the Python API is a very basic script to just get the basics of your APIWrapper call correct. A great simple example of accessing the "Users" table is directly in the text of the README.md file here.

Troubleshooting ideas:

  • Try with both a real username/password combination and with an API key
  • You can try putting the credentials (in either form) directly in the script to confirm they work before using netrc to provide them
  • Documentation for APIWrapper is here, with some notes and links about CSRF protection and redirects, which are the first things that jump out about that traceback and your description.

Hopefully that helps you track this down,

--Molly