The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When using Postman, my api call works, however, powershell gives 401 even with tls 1.2.

Jeffrey Lanteigne
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2020

I am trying to execute the following, but it is giving me a 401 - unauthorized result.  This call works in postman, but not in powershell.  I have been bitten by the powershell tls issue before, but I thought forcing tls 1.2 would work.  Thoughts?

 

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$response = Invoke-WebRequest -Uri "https://my-domain.atlassian.net/rest/servicedeskapi/servicedesk/42/queue" -Headers @{
"method"="GET"

"user"="me@my-Domain.com:anAwesomApiKey"
}

$response

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Jeffrey Lanteigne
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2020

I must have read a wrong bit of documentation.  I went ahead and changed the authentication header to be basic, with the username as my username and the password as my auth token and it worked.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events