You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Good evening,
I have been trying to send a PUT request to the Confluence API using a groovy script, It works fine if I use curl but I am not able to do it with the following code. I always get a 403.
Hi @Borja Tortosa . It's hard to say. What is the error code? What is the error message? Did you provide all necessary parameters for the PUT request?
I am getting a 403, but I did provide the authorization:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thoughts:
1. You don't have a space in the line
"Basic" + "${auth}"
after "Basic". Should be "Basic " (space before last quote).
Right now you have
Basicusername:token
Should be
Basic username:token
2. Are you sure about ?
def auth = "username:token".bytes.encodeBase64()
Did you try?
def auth = "username:token"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.