"/api/v3/brokerage/products?product_ids=BTC-EUR&product_ids=ETH-EUR" not working

With python I try to get information of products with

/api/v3/brokerage/products?product_ids=BTC-EUR&product_ids=ETH-EUR

This give me an error.
If I try only

/api/v3/brokerage/products

I get information over all products.
If I try

/api/v3/brokerage/products/BTC-EUR

I will get all information about BTC-EUR
I like to use with a choice of product_ids to get only these informations in one time.
Any idea?

Please provide error message. In quick test seems to work fine for me…

This is my code starting at line 93

print("------------------------------------------------------------------------")
print("--- List Products and get actual price")
print("------------------------------------------------------------------------")
sleep(1)

path = "/api/v3/brokerage/products?product_ids=BTC-EUR&product_ids=ETH-EUR"
method = "GET"
payload = ''

# Generate timestamp
timestamp = str(int(time.time()))
message = timestamp + method + path + payload
signature = hmac.new(SECRET_KEY.encode('utf-8'), message.encode('utf-8'), digestmod=hashlib.sha256).hexdigest()

# Set headers
headers = {
"accept": "application/json",
"CB-ACCESS-KEY": ACCESS_KEY,
"CB-ACCESS-SIGN": signature,
"CB-ACCESS-TIMESTAMP": timestamp
}

# Send request
conn.request(method, path, payload, headers)

# Get response
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

# Print response
result = json.loads(data)
json_formatted_str = json.dumps(result, indent=2)
print(json_formatted_str)
#print(result)

This is the result:

------------------------------------------------------------------------
--- List Products and get actual price
------------------------------------------------------------------------
Unauthorized

Traceback (most recent call last):
  File "/var/www/html/coinbase/advanced/test2.py", line 124, in <module>
    result = json.loads(data)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I see “Unauthorized” but other queries like “Get Account” works fine.

You will find your answer here:

Thank you very much. It’s realy not easy to see the example and find out this.
I have changed and it works

message = timestamp + method + path.split('?')[0] + payload