I am wokring with a corporate binance account.
When querying the subaccount list, we used the secret key(create from master waller) and were able to retrieve the lists without any issues. The endpoint we used was /sapi/v1/broker/subAccount
, which worked fine.
However, the issue arises when we try to use the https://cb.link-kycapi.com
domain for linking accounts or querying KYC status. In this case, we get a “signature mismatch” error.
I am currently integrating with the Binance API for KYC linking, specifically the endpoint:
https://cb.link-kycapi.com/bapi/ekyc/v2/public/ekyc/customer/add-account-info-list
When attempting to call this API, I am passing the signature in the request header, as outlined in the Integrating Link KYC documentation. The signature is generated using the following code:
const signature = crypto.createHmac('sha256', this.secretKey).update(JSON.stringify(params)).digest('hex');
However, I am encountering the following error response:
{
"errorData": "signature mismatch",
"code": "10040080"
}
Could you please clarify the following:
- Secret Key Usage: Should the
secretKey
used to generate the signature be the one associated with the master account? Or is a different key required for this API call? - Permissions: Are there any specific permissions that need to be enabled on the API key used for this request? If so, could you provide guidance on what permissions are necessary?
- Possible Causes of Signature Mismatch: Could there be any other factors that might cause the
signature mismatch
error? For instance, any specific formatting or parameters that need to be included when generating the signature?
At the moment I am using secret key created from master account.