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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to auto generate a new child page with Powershell and OAuth token Edited

Hello dear community,

I am trying to auto generate a new confluence child Page using Powershell and OAuth token

For this I am using the commands below but always receive the error

WARNING: Confluence returned HTTP error 401 - Unauthorized
Invoke-Method : An unknown error ocurred.
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.5.0\ConfluencePS.psm1:249 char:14
+ (Invoke-Method @iwParameters).value
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (:String) [Invoke-Method], ArgumentException
+ FullyQualifiedErrorId : InvalidResponse.Status401,Invoke-Method
WARNING: Failed to create child page. Check whether you are trying to upload an existing alert version, then try again.


The approach I am using is the following

$SecurePassword = ConvertTo-SecureString $ConfluenceOuthToken -AsPlainText -Force

$Cred = New-Object System.Management.Automation.PSCredential ($ConfluenceUserID, $SecurePassword)

$ChildPageName = 'Test' + $AlertVersion + '- Alert List'

$ScriptPath = $PSScriptRoot.Substring(0, ($PSScriptRoot.Length - 9)) + 'Alerting/Alerts/'

Set-ConfluenceInfo -BaseURi '' -Credential $Cred -EA 0 -WA 0


New-ConfluencePage -Title $ChildPageName -ParentID 162xxx -Body $PageBody -EA 0 -WA 0


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,591 views 7 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you