Also use authentication for json requests

Not using authentication for json requests will result in 403 when the Jenkins server requires authentication.