Binance signature error : “code”:-1022,“msg”:“Signature for this request is not valid.”

When trying to hit the route ‘http://binance.com/api/v3/account’, I get the following error:
{“code”:-1022,“msg”:“Signature for this request is not valid.”}
signature = hmac.new(self._secret_key.encode(“utf-8”), query.encode(“utf-8”), hashlib.sha256).hexdigest()

url=http://binance.com/api/v3/account?timestamp=1562387596256@Signature=xxx
headers[“X-MBX-APIKEY”] = self._access_key

response = await session.get(url, params=params, headers=headers, timeout=100, **kwargs)

nowTime=time.asctime(time.localtime(time.time()))
print("======ceshi_nowTime=====",nowTime , response.status)
print("======ceshi_response.text======", response.text)

print======ceshi_nowTime=====Tue Jun 29 15:43:47 2021 400
print=====ceshi_response.text====== is::::: <CIMultiDictProxy(‘Content-Type’: ‘application/json;charset=UTF-8’, ‘Content-Length’: ‘63’, ‘Connection’: ‘keep-alive’, ‘Date’: ‘Tue, 29 Jun 2021 15:43:47 GMT’, ‘Server’: ‘nginx’, ‘x-mbx-uuid’: ‘113e2403-3016-4294-8298-55fef58436a3’, ‘x-mbx-used-weight’: ‘10’, ‘x-mbx-used-weight-1m’: ‘10’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubdomains’, ‘X-Frame-Options’: ‘SAMEORIGIN’, ‘X-Xss-Protection’: ‘1; mode=block’, ‘X-Content-Type-Options’: ‘nosniff’, ‘Content-Security-Policy’: “default-src ‘self’”, ‘X-Content-Security-Policy’: “default-src ‘self’”, ‘X-WebKit-CSP’: “default-src ‘self’”, ‘Cache-Control’: ‘no-cache, no-store, must-revalidate’, ‘Pragma’: ‘no-cache’, ‘Expires’: ‘0’, ‘X-Cache’: 'Error from cloudfront, ‘Via’: ‘1.1 c250398edc425xxx74d769ea42e6dbecc.cloudfront.net (CloudFront)’, ‘X-Amz-Cf-Pop’: ‘HKG60-C1’, ‘X-Amz-Cf-Id’: ‘7VxNgpR4-DrxxxGnbUQyHl6NexGs4oNOvme2O0WdRZ5y8LX26Td0qTw==’)>

The client uses Alibaba cloud(alicoud+v6n)
1、when I tested SHA256 with the official API without any problem,
2、timestamp also no problem,Computer time is the time of GMT International time,When I url add recvWindows=5000 it’s 1022 the same mistake
3\so I never found out what the problem without( X-Cache’: 'Error from cloudfront),Does anyone have any suggestions ,thanks

Valid request url would be:
GET https://api.binance.com/api/v3/account?timestamp=1624982990658&signature=xxx

You can consult https://github.com/binance-exchange/binance-signature-examples to check signature generation for different langs.

1、My connection was always successful before, but suddenly the connection failed
2、After I regenerate the API secret key, it is still not successful

=====print url is======
https://api.binance.com/api/v3/account?timestamp=16250233xxx85&signature=xxx

I just made sure there was no problem ,and Whether Ali cloud server has a problem or “Error from cloudfront”??

Do you have more information on the returned error message? It doesn’t seem to be a Binance error, but coming from “Cloudfront”.
What happens if you try to send the same request with https://github.com/binance-exchange/binance-api-postman ?

(Also, for safety, don’t show your signature here)