Skip to content

Authentication fail. #18

Description

@phidinhthao

when i use demo codes python, nodejs for API 4.0 result:
{"error": {"code": 11, "message": "Authentication fail."}, "result": null, "id": 4041}

The algorithm sign params is wrong?
Code python:
def get_sign(secret_key, message):
h = (base64.b64encode(hmac.new(secret_key.encode('utf-8'), message.encode('utf-8'), hashlib.sha512).digest())).decode()

Code nodejs:
function getSign(str) {
return crypto.createHmac('sha512', SECRET).update(str).digest().toString('base64');

Activity

  1. revilwang commented on Jun 30, 2021

    @revilwang
    Collaborator

    I think you should use gatews instead.

    What is the content of message input and the detailed server host you connect

  2. phidinhthao commented on Jun 30, 2021

    @phidinhthao
    Author

    I think you should use gatews instead.

    What is the content of message input and the detailed server host you connect

    Thanks for support, I'll try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions