Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Jeffrey Lanteigne 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

0 votes
Answer accepted
Jeffrey Lanteigne 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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events