Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-02-26 05:08 AM
I am trying to call contentapi using below code but I am getting error, I can access content api from browser and getting all the endpoint. Am I doing something wrong.
Code -
$SessionToken = "session token of account with admin access"
$Server = "https://myarcherserver"
$Uri = "contentapi"
$Headers = @{"accept" = "application/json"; "content-type" = "application/json"; "Authorization" = ("Archer session-id=`"" + $SessionToken + "`""); "X-Http-Method-Override" = $Method.GET }
$Response = Invoke-RestMethod -Method $Method.POST -Headers $Headers -Uri ($Server+$Uri) -body (convertto-json $Body)
$Response
Error I am getting -
Invoke-RestMethod :
401 - Unauthorized: Access is denied due to invalid credentials.
Server Error
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.
2019-02-26 05:48 AM
Are you pointing to the contentapi node in your url? because example is not clear on that.
Also, I am not sure if you need to use single quotes (`) on the session-id in your header for authorization.
2019-02-26 05:48 AM
Are you pointing to the contentapi node in your url? because example is not clear on that.
Also, I am not sure if you need to use single quotes (`) on the session-id in your header for authorization.
2019-02-26 06:02 AM
Thnx, I removed quote and it worked.
2019-02-26 06:05 AM
Anytime
2019-02-28 11:45 AM
Strangely contetapi stopped working and I see below error while accessing it via browser. I have anonymous authentication enabled and Windows Authentication disabled. It was working till yday but stopped working now what could be the issue.
2019-02-28 11:46 AM
Check if account got locked somehow.
2019-02-28 11:50 AM
Account is active and has sysadmin access, not only my script has stopped working also I cant access content api via browser.
2019-02-28 11:52 AM
Are u using non windows integrated SSO? Maybe SiteMinder or similar?
Maybe these API nodes are shielded by SSO then?
2019-02-28 11:54 AM
We are using windows sso.
2019-02-28 11:56 AM
When I enable windows auth it works but prompts work creds. I dont want that. But it was working with anonymous auth earlier.