Splunk Cloud Platform

Request failed: Session is not logged in Error - while running python script for rest apis

manish_singh_77
Builder

Hi Team,

I am getting an error message "Request failed: Session is not logged in." when trying to run rest apis from python script.

Curl command works fine, it generates the session key as well it connects to the splunk results and fetches the results.

I am using this in my script.

import splunklib.client as client
service = client.connect(host=host, port=8089,username=user, password=password)

Am I missing anything here?

I am

Labels (1)
Tags (1)
0 Karma
1 Solution

manish_singh_77
Builder

Issue got resolved by updating splunklib

View solution in original post

0 Karma

manish_singh_77
Builder

Issue got resolved by updating splunklib

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...