> On 10.05.2016, at 10:13, Sorin <[email protected]> wrote:
> 
> - sending a GET or PUT request with URL encoded parameters, failed miserably 
> .../buildWithParameters?token=MY_TOKEN&myparam=VALUE answers dryly 403 
> forbidden (why forbidden?)

The token only allows building if the authentication otherwise allows read 
access to the job.

> - sending a POST request with payload like 
> json='{"parameter":[{"myparam":"VALUE"}]}' (or any other payload for that 
> matter, stackoverflow has conflicting answers) gives me a 403 "no valid 
> crumb...". There seem to be people on the internet which know that some 
> ".crumb" must be changed but nothing says WHAT that dot-crumb is, who 
> generates it, or how should it look like.

https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API#RemoteaccessAPI-CSRFProtection

Note that passing the JSON string is a hackish unsupported solution -- this 
approach emulates what a web browser does, and the browser submits whatever the 
"Build with Parameters" form tells him to, i.e. there's no reasonable 
expectation of backwards compatibility if we ever change the form.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7CAB5C5C-37CB-43B5-A3AF-3EDF5D36CAFF%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to