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:
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"
It looks like you're new here. Sign in or register to get started.