SoftSale POST Request for Installation Error

Discussion in 'Integration' started by rodvan, Jul 19, 2019.

  1. rodvan

    rodvan New Member

    Joined:
    May 28, 2019
    Messages:
    2
    Hello..
    Ive tried a lot to send data in different types, I am totally lost.
    Here is my code:
    Code:
    import requests, json, uuid
    url = "http://domain.net/amember/softsale/api/activate"
    key = 'LNGJZHSJLRF4RD68K5'
    hardwareid = uuid.getnode()
    
    #params = {"key" : key, "hardware-id" : hardwareid }
    params = {'key' : key, 'request' : ('hardware-id',  hardwareid) }
    #params = [('hardware-id', hardwareid), ('key', key)]
    
    r = requests.post(url, data=params)
    print(r.text)
    But I keep getting this error:
    {"message":"Required activation parameter [hardware-id] not passed","code":"invalid_input","next_check":120}

    Can someone help me achieve passing hardware-id correctly? Thanks.

Share This Page