Authentication and API Key Error

Authentication and API Key Error

This page provides a comprehensive list of potential error codes that may arise during API authentication.


K001 - Missing authentication header

HTTP Status: 401

Error Message: Missing authentication header. Kindly include a Base64 encoded key in the basic authentication header.

This is caused by sending a request without an Authorization header.

Ensure that you have encoded the correct API key for Basic HTTP authentication and have included it in the Authorization header of your HTTP request.


K002 - Key has expired

HTTP Status: 401

Error Message: Key has expired. Please generate a new key.

This error will be encountered when the API key used is already expired.

You should re-create a new API key via the Maya Manager.


K003 - Invalid authentication credentials

HTTP Status: 401

Error Message: Invalid authentication credentials. Kindly verify if the key you are using is correct.

You will encounter this error when you provide incorrect values for the Basic HTTP authentication in the Authorization request header.

Ensure that you have encoded the correct API key for Basic HTTP authentication and included it in the Authorization header of your HTTP request.


K004 - Invalid endpoint

HTTP Status: 401

Error Message: Invalid endpoint. Please check if you are accessing the correct endpoint/resource.

This error will be encountered when you are:

  • Calling an invalid endpoint or incorrect URL
  • Using inappropriate API keys (public or secret keys)

Ensure you are using the appropriate API keys and calling the correct endpoint.


K006 - Invalid authentication credentials

HTTP Status: 401

Error Message: Invalid authentication credentials. Key provided is not a valid Base64 encoded key.

This error will be encountered when you have provided an invalid Authorization header value.

Review and ensure you are sending the correct Basic HTTP authentication value for the Authorization HTTP request header.


K007 - Invalid key scope

HTTP Status: 401

Error Message: Invalid key scope. Please check the provided key's scopes.

This will be encountered when the API key does not have the scope required by the endpoint called.

Review the scope of your API key and use the appropriate key.


K999 - A problem is encountered

HTTP Status: 400

Error Message: A problem is encountered. Please contact PayMaya support.

This is caused by a generic error during API request authentication.

You may retry the operation. If problem persists, contact your Maya Relationship Manager.