When to use Bearer, when to use Basic authentication

When to use Bearer Authentication? and when to use Basic Auth? Are these supported in all Maya Solutions?

It seems you may be referring to Bearer Authentication and Basic Authentication. Bearer Authentication is used for Maya Mini App Solution, specifically for Profile Sharing and Payments only. It is an industry-standard framework for securing access to APIs and user data. Basic Authentication is used for token requests in Maya Connect API. The context also mentions that API credentials are specific to the Maya solution being used.

Bearer Authentication

  • Use for Maya Mini App Solution (Profile Sharing and Payments)
  • Industry-standard framework for securing access to APIs and user data

Basic Authentication

  • Use for token requests in Maya Connect API
  • Send client_id and client_secret encoded in Base64 with each request

These authentication methods are supported in specific Maya Solutions, such as Maya Mini App and Maya Connect. However, API credentials are specific to the Maya solution being used.

For Sandbox concerns and other technical implementation inquiries, please get in touch with us via:

  • Sandbox Health Page: Check real-time service status updates.
  • Maya Developer Hub Service Desk: File
    a ticket in Sandbox.

To Know More:

We value your input and would love to hear your insights. Please submit you feedback here.

Hello @kuro.mias22,

Thank you for your patience. The AI-generated response above contains a few inaccuracies, so here’s the correct information for your reference:

Bearer Authentication

  • An industry-standard framework for securing access to APIs and user data.
  • Requires generating a client token via Maya Connect.
  • Currently used for:
    • Maya Mini App Solution (Profile Sharing and Payments)

Basic Authentication

  • Sends credentials or required keys Base64-encoded with each request.
  • API credentials are tied to the specific Maya solution being used.
  • Currently used across most Maya Solutions, including:
    • Online Payments (Maya Checkout, Maya Vault, Pay with Maya)
    • Payment Processing Platform
    • Cash-in Solutions (Maya Login, Code, Mini App)
    • Remittance to Maya Wallet
    • Maya Connect (for generating bearer tokens)

For reference:

If you have more questions about authentication flows or integration requirements, feel free to ask.

1 Like

Thank you @genson.cerezo.

When using the token from Maya Connect, do I need to convert it to Base64?

Hello @kuro.mias22,

No, you do not need to Base64-encode the token issued by Maya Connect.

The client token should be sent as-is in the Authorization header using the Bearer scheme, for example:

Authorization: Bearer <client_token>

Base64 encoding is only required for Basic Authentication, where your API key and secret are combined and encoded.

For Bearer Authentication (used with Maya Connect), the token is already in the correct format and should not be modified.

If you’re seeing authorization errors, feel free to share which endpoint you’re calling and the headers you’re sending.