<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Authentication failed using Python for SpiraTest (v7.6.1.0) (Thread)</title><description>      Hello,      I believe something was changed after the update of SpiraTest (v7.6.1.0) Currently  Im trying to figure out how to fix it. Previously the following code used to work:     import requests
RUNNER_LINK = f"https://company.co.uk/SpiraTest/Services/v7_0/RestService.svc"
api_key = '{B303FEC2-XXX-XXXX-XXXX-E1C9A891725F}'
username = "SmithJ"
RUNNER_NAME = "John Smith"
params = {'username': username,   'api-key':api_key}
headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent':RUNNER_NAME}
uri = "users"
get_users = requests.get(f'{RUNNER_LINK}/{uri}',  params=params, headers=headers)
print(get_users)      I get response:           Which means: The HTTP 400 Bad Request client error response status code indicates that the server would not process the request due to something the server considered to be a client error. The reason for a 400 response is typically due to malformed request syntax, invalid request message framing, or deceptive request routing      Note      1. api_key copied form RSS / API Key.     2. Enable RSS Feeds: Yes       Do I need to add LDAP DN (CN=SmithJ,OU=Development,OU=companyUsers,DC=company,DC=co,DC=uk) into the params of to the header?      Potentially it could be caused by the company setting/permission.      Best Regards, N       </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/integrations/ide-integration/2964.aspx</link><item><guid isPermaLink="false">threadId=2964</guid><author>Navi Vogood (ishoro13@gmail.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">python</category><title>Authentication failed using Python for SpiraTest (v7.6.1.0)</title><description>      Hello,      I believe something was changed after the update of SpiraTest (v7.6.1.0) Currently  Im trying to figure out how to fix it. Previously the following code used to work:     import requests
RUNNER_LINK = f"https://company.co.uk/SpiraTest/Services/v7_0/RestService.svc"
api_key = '{B303FEC2-XXX-XXXX-XXXX-E1C9A891725F}'
username = "SmithJ"
RUNNER_NAME = "John Smith"
params = {'username': username,   'api-key':api_key}
headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent':RUNNER_NAME}
uri = "users"
get_users = requests.get(f'{RUNNER_LINK}/{uri}',  params=params, headers=headers)
print(get_users)      I get response:           Which means: The HTTP 400 Bad Request client error response status code indicates that the server would not process the request due to something the server considered to be a client error. The reason for a 400 response is typically due to malformed request syntax, invalid request message framing, or deceptive request routing      Note      1. api_key copied form RSS / API Key.     2. Enable RSS Feeds: Yes       Do I need to add LDAP DN (CN=SmithJ,OU=Development,OU=companyUsers,DC=company,DC=co,DC=uk) into the params of to the header?      Potentially it could be caused by the company setting/permission.      Best Regards, N       </description><pubDate>Mon, 02 Sep 2024 14:32:02 -0400</pubDate><a10:updated>2025-04-19T01:20:07-04:00</a10:updated><link>/Support/Forum/integrations/ide-integration/2964.aspx</link></item><item><guid isPermaLink="false">messageId=6957</guid><author>Navi Vogood (ishoro13@gmail.com)</author><title>   Also when Ive tried to use the link directly       https:/company.co.uk/SpiraTest/Services/v7_0/R</title><description>   Also when Ive tried to use the link directly       https:/company.co.uk/SpiraTest/Services/v7_0/RestService.svc/projects?username=fredbloggs&amp;api-key={B303FEC2-XXX-XXXX-XXXX-E1C9A891725F}     I received the following message:     The server encountered an error processing the request. The exception message is 'Access is denied.'. See server logs for more details. The exception stack trace is:

at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  </description><pubDate>Mon, 02 Sep 2024 14:42:25 -0400</pubDate><a10:updated>2024-09-02T14:42:25-04:00</a10:updated><link>/Support/Forum/integrations/ide-integration/2964.aspx#reply6957</link></item><item><guid isPermaLink="false">messageId=6958</guid><author>David J (adam.sandman+support@inflectra.com)</author><title> Please check the Event Log inside Spira for the first case, it will provide more information on wha</title><description> Please check the Event Log inside Spira for the first case, it will provide more information on what is causing the issue.  The second one looks like you are using a sample user fredbloggs and so that makes sense that you are getting an authorization error.  Note that there were no breaking changes in our API in v7.6.1.0, in fact we deliberately version our APIs to avoid this.  If that doesnt help, please log a support ticket with us.  Regards  David </description><pubDate>Mon, 02 Sep 2024 21:57:46 -0400</pubDate><a10:updated>2024-09-02T21:57:46-04:00</a10:updated><link>/Support/Forum/integrations/ide-integration/2964.aspx#reply6958</link></item><item><guid isPermaLink="false">messageId=7183</guid><author>jason bevis (bevisjason0405@gmail.com)</author><title> SpiraTest updates may:    Change the API endpoint format or parameters    Enforce stricter header o</title><description> SpiraTest updates may:    Change the API endpoint format or parameters    Enforce stricter header or authentication handling    Deprecate old versions (e.g., v7_0 endpoint)    Tighten access control for certain users or keys   </description><pubDate>Sat, 19 Apr 2025 01:20:07 -0400</pubDate><a10:updated>2025-05-07T09:37:16-04:00</a10:updated><link>/Support/Forum/integrations/ide-integration/2964.aspx#reply7183</link></item></channel></rss>