Basic auth failure 403

kardon December 18, 2019

I'm trying to use curl to update a custom field which I created using the add on Project Team for Jira Server. My issue is that I get a 403, even tho I'm using my admin credentials and gave my user permissions to edit custom fields.

Thanks

This is my code:

$username = 'username';
$password = 'password';
$url = 'http:/localhost:8080/rest/stonikbyte-project-team-api/1.0/custom-field-value/username/fieldkey';$data = array("value" => "Wurstverkauf");
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_PUT, true);curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$response = curl_exec($ch);
echo $response;

 

1 answer

0 votes
kardon December 18, 2019

NEVERMIND, I FINALLY GOT IT TO WORK

Suggest an answer

Log in or Sign up to answer