# Down a rabbit hole with http and Milestone

**URL:** <https://forum.inductiveautomation.com/t/down-a-rabbit-hole-with-http-and-milestone/111473>\
**Category:** Ignition\
**Created:** [October 15, 2025, 2:41pm UTC](https://forum.inductiveautomation.com/t/down-a-rabbit-hole-with-http-and-milestone/111473 "2025-10-15T14:41:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Jordan\_Richardson](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Jordan\_Richardson](https://forum.inductiveautomation.com/u/Jordan_Richardson)\
**Post date:** [October 15, 2025, 3:27pm UTC](https://forum.inductiveautomation.com/t/down-a-rabbit-hole-with-http-and-milestone/111473/3 "2025-10-15T15:27:58Z")

</div>

I was able to get the api token with the following code(actual URL and creds omitted obviously). Now on to the bookmarking. I might run into the issue that Nick had in this post [Problems with Talk2M DMWeb API through system.net.httpClient and system.net.httpPost - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/problems-with-talk2m-dmweb-api-through-system-net-httpclient-and-system-net-httppost/40441/7), but we’ll see shortly!

```python
import urllib
url = "http://somebogusurl.com/API/IDP/connect/token"
payload = urllib.urlencode({
    "grant_type": "password",
    "username": "User",
    "password": "password",
    "client_id": "GrantValidatorClient"
})

try:
    # Create an HttpClient instance (or use system.net.httpClient directly in Ignition 8.3+)
    # For older versions, consider creating a top-level instance for reuse.
	httpClient = system.net.httpClient() 
    
    #response = httpClient.post(url, data=payload) # Use data for form-urlencoded
    # Or for JSON payload:
	response=httpClient.post(url=url, headers={"Content-Type":"application/x-www-form-urlencoded"}, data=payload) 
	print response.json

except Exception as e:
	print(e)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/down-a-rabbit-hole-with-http-and-milestone/111473)._
