<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Authentication failed using Python (Thread)</title><description> Hello,  Im trying to get response form spiratest using python.  Here is the code I wrote.    import json, requests
body = {"highlightedLinkId": -8}
headers = {
    'accept': 'application/json',
    'Content-Type': 'application/json',
    'User-Agent': "John Smith",
}

params = {
    'username': 'SmithJ',
    'api-key': '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX}',
}
url = "https://company.name.co.uk/SpiraTest/Services/Ajax/GlobalService.svc/GlobalNavigation_RetrieveWorkspaces"
response = requests.post(url, data=json.dumps(body), params=params, headers=headers)
print(response.text)   Ive copied RSS / API Key from the settings.        However I have the following error:   {Message:Authentication failed.,StackTrace:,ExceptionType:}      Could you tell me please what Im doing wrong, please.  Thank you in advance for any response.  </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spiratest/issues-questions/2875.aspx</link><item><guid isPermaLink="false">threadId=2875</guid><author>Navi Vogood (ishoro13@gmail.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">python</category><title>Authentication failed using Python</title><description> Hello,  Im trying to get response form spiratest using python.  Here is the code I wrote.    import json, requests
body = {"highlightedLinkId": -8}
headers = {
    'accept': 'application/json',
    'Content-Type': 'application/json',
    'User-Agent': "John Smith",
}

params = {
    'username': 'SmithJ',
    'api-key': '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX}',
}
url = "https://company.name.co.uk/SpiraTest/Services/Ajax/GlobalService.svc/GlobalNavigation_RetrieveWorkspaces"
response = requests.post(url, data=json.dumps(body), params=params, headers=headers)
print(response.text)   Ive copied RSS / API Key from the settings.        However I have the following error:   {Message:Authentication failed.,StackTrace:,ExceptionType:}      Could you tell me please what Im doing wrong, please.  Thank you in advance for any response.  </description><pubDate>Thu, 30 Nov 2023 18:58:41 -0500</pubDate><a10:updated>2023-11-30T21:32:39-05:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/2875.aspx</link></item><item><guid isPermaLink="false">messageId=6544</guid><author>David J (adam.sandman+support@inflectra.com)</author><title> That is not a valid API endpoint, that is in an internal service that requires an authenticated ses</title><description> That is not a valid API endpoint, that is in an internal service that requires an authenticated session.  Instead, please use one of these API endpoints:   https://api.inflectra.com/Spira/Services/   For example, for v7.0 REST API:   https://api.inflectra.com/Spira/Services/v7_0/RestService.svc   The documentation is here:   https://api.inflectra.com/Spira/Services/v7_0/RestService.aspx  </description><pubDate>Thu, 30 Nov 2023 21:32:39 -0500</pubDate><a10:updated>2023-11-30T21:32:39-05:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/2875.aspx#reply6544</link></item></channel></rss>