Skip to content

Sandbox requests fails unexpectedly even with valid credentials #61

@mainangethe

Description

@mainangethe

Summary:

Even with correct sandbox username and API key, the gem fails to send SMS through sandbox endpoint. No meaningful error message is returned unless manually debugging the connection.

Precondition:

  • Valid sandbox credentials
  • Internet access

Steps to Reproduce:

require 'AfricasTalking'

at = AfricasTalking::Initialize.new('sandbox', 'valid_sandbox_api_key')
sms = at.sms

response = sms.send(
  message: 'Test Message',
  to: '+2547XXXXXXX'
)

puts response

Expected Result:

Response with SMSMessageData including status and recipient

Actual Result:

Error: AfricasTalking::AfricasTalkingException: The supplied authentication is invalid

Notes:

Docs suggest sandbox is fully supported, but actual use via gem fails
No fallback or warning that sandbox environment may not be available
Users waste time debugging gem, credentials or logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions