aman kumar
aman kumar

Reputation: 3156

Invalid Runame In eapy api in getiing session

I am trying to get the ebay session id from ebay python sdk. When i make request to the api. I am getting the error invalid ru_name. I have cross checked with name. It's correct.

Upvotes: 0

Views: 298

Answers (1)

Holtz Ilya
Holtz Ilya

Reputation: 511

This is my GetSession python code, Works good for me.

    from ebaysdk.exception import ConnectionError
    from ebaysdk.trading import Connection as Trading

    myRuName = "XXXXXXXXXXXXMyRuNameXXXXXXXXXXXXXXXXXX"
    myAppID = "XXXXXXXXXXXXXMyAppIDXXXXXXXXXXXXXXXXXXX"
    myDevID = "XXXXXXXXXXXXXMyDevIDXXXXXXXXXXXXXXXXXX"
    myCertID = "XXXXXXXXXXXXXXMyCertIDXXXXXXXXXXXXXXXX"
    myFlags = {'RuName': myRuName}

    try:    
        api = Trading(config_file=None, appid=myAppID, devid=myDevID, certid=myCertID)
        response = api.execute('GetSessionID',myFlags)
        print 'SessionID = '+response.reply.SessionID
    except ConnectionError as e:
        print(e)
        print(e.response.dict())

Hope this helps.

Upvotes: 1

Related Questions