Forum Discussion
A bit more detail on the API calls. The variale LIAPISESSIONKEY is filled with the value of LISESSIONID cookie from my browser. Which runs on the same machine.
curl -X POST \
https://community.microfocus.com/api/2.0/messages \
-H 'content-type: application/json' \
-H "li-api-session-key: $LIAPISESSIONKEY" \
-d '{
"data":{
"type":"message",
"subject":"Test Subject",
"body":"API Test body",
"board":{
"id":"Management"
}
}
}'
- NarendraG5 years agoKhoros Alumni (Retired)
Hi korffr LiSESSIONID is a cookie session id and li-api-session-key is a session token, they both are different.
instead of li-spi-session-key header, pass the LiSESSIONID as a cookie in the curl request with -b or --cookie option. It should work.
for example:
curl -X POST \
https://community.microfocus.com/api/2.0/messages \
-H 'content-type: application/json' \
-b "LiSESSIONID=<session_id_from_a_logged_in_cookies_section_of_your_browser>" \
-d '{
"data":{
"type":"message",
"subject":"Test Subject",
"body":"API Test body",
"board":{
"id":"Management"
}
}
}'
Related Content
- 2 years ago
- 11 years ago
- 4 months ago
- 9 years ago