06-19-2025 01:34 AM
Hello, everyone.
When sending API calls to SD-WAN vManage, you must first log in with username and password (specified as j_username and j_password) and send a POST request to the vManage under /j_security_check. This will generate a JSESSION ID as a cookie - which is then used to generate a token so we can make API Requests..
The documentation states that the POST request for the cookie/session ID must have the data/form set to x-www-form-urlencoded What does this mean? Postman has several options for us to use to specify the data, but the form mentioned above always has to be selected otherwise the request won’t work. What exactly is www-form-urlencoded?
Thank you.
David
Solved! Go to Solution.
06-19-2025 01:45 AM
Hey @Mitrixsen x-www-form-urlencoded means, the data in your post request body must be formatted as key-value pairs which must be separated by ampersands, so in sd-wan you have j_username=yourusername&j_password=yourpassword. This is a data encoding format that converts form data into a url like string format where spaces become '+' signs, special characters are percent encoded (like %20 for space)
If you tried to send this say in json ({"j_username": "user", "j_password": "pass"}), the vManage authentication handler would not get this or parse it correctly, which would cause any login to fail even if you used the right correct creds.
This document will help too https://apidog.com/articles/x-www-form-url-encoded-requests/
Hope this helps.
06-19-2025 01:45 AM
Hey @Mitrixsen x-www-form-urlencoded means, the data in your post request body must be formatted as key-value pairs which must be separated by ampersands, so in sd-wan you have j_username=yourusername&j_password=yourpassword. This is a data encoding format that converts form data into a url like string format where spaces become '+' signs, special characters are percent encoded (like %20 for space)
If you tried to send this say in json ({"j_username": "user", "j_password": "pass"}), the vManage authentication handler would not get this or parse it correctly, which would cause any login to fail even if you used the right correct creds.
This document will help too https://apidog.com/articles/x-www-form-url-encoded-requests/
Hope this helps.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide