# Calling the /build API from PostMan

**URL:** https://community.jenkins.io/t/calling-the-build-api-from-postman/8653
**Category:** Ask a question
**Tags:** api
**Created:** [July 25, 2023, 9:48am UTC](https://community.jenkins.io/t/calling-the-build-api-from-postman/8653 "2023-07-25T09:48:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![GreyFox](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@GreyFox](https://community.jenkins.io/u/GreyFox)
#### Post date: [July 25, 2023, 9:48am UTC](https://community.jenkins.io/t/calling-the-build-api-from-postman/8653/1 "2023-07-25T09:48:14Z")

</div>

Greetings

1. Am in busy investigating the use of Jenkins. I will be using other software to control the build (pipeline) via the API URL.
2. I am a newbie
3. I have created an API key and added to the project
4. I am testing the URL access using PostMan
5. I am using the following POST request http://------/job/—/build?token=api\_token. That is the name of the token in the user account section. This example code was taken from the job tab. Even if I put the key I get the same result
6. I am getting a 403 return code and in the body it says:  
HTTP ERROR 403 No valid crumb was included in the request
7. I know it is not a Jenkins issue however it would appear that in the excellent Jenkins doc that discusses the API a step or so have been left out ([Remote Access API](https://www.jenkins.io/doc/book/using/remote-access-api/))

What I need is a HTTP Post Example (the doc provide a curl example).

Regards

---

<div class="post-metadata">

### Author: ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)
#### Post date: [July 25, 2023, 9:55am UTC](https://community.jenkins.io/t/calling-the-build-api-from-postman/8653/2 "2023-07-25T09:55:56Z")

</div>

The token from a user must be used in a different way. It is used like a password so you need to create a basic authentication in postman with the token. You will also not need a crumb in the request when you use a token  
Using curl it would look like this:  
`curl -XPOST -u username:api_token http://.../jobname/build` when the job is without parameters.  
The approach with Build `build?token=token` is deprecated and shouldn’t be used anymore.

---

<div class="post-metadata">

### Author: ![GreyFox](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@GreyFox](https://community.jenkins.io/u/GreyFox)
#### Post date: [July 25, 2023, 10:00am UTC](https://community.jenkins.io/t/calling-the-build-api-from-postman/8653/3 "2023-07-25T10:00:48Z")

</div>

Greetings

As simple as that, very thanks

Regards
