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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.