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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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