🔥 Firebase Cloud Messaging v1 API - Test

Step 1: Configuration Check

✅ Service account file found

PropertyValue
Project IDsmsapi-inc-mk
Client Emailfirebase-adminsdk-fbsvc@smsapi-inc-mk.iam.gserviceaccount.com
Private Key✅ Present

✅ Project ID matches configuration

Step 2: OAuth2 Token Generation

✅ Access token generated successfully

Token preview: ya29.c.c0AZ4bNpbNvAhq13vW03RRo...

Token length: 1024 characters

Step 3: FCM API Connectivity

API Response:

{
    "success": false,
    "error": "{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Invalid value at 'message.data[1].value' (TYPE_STRING), 1772325804\",\n    \"status\": \"INVALID_ARGUMENT\",\n    \"details\": [\n      {\n        \"@type\": \"type.googleapis.com\/google.rpc.BadRequest\",\n        \"fieldViolations\": [\n          {\n            \"field\": \"message.data[1].value\",\n            \"description\": \"Invalid value at 'message.data[1].value' (TYPE_STRING), 1772325804\"\n          }\n        ]\n      }\n    ]\n  }\n}\n",
    "http_code": 400
}

⚠️ Unexpected response


Summary

✅ Firebase Cloud Messaging is Ready!

What's working:

Next steps:

  1. Build API endpoints (register.php, send.php, etc.)
  2. Build Android app
  3. Test real SMS sending

Reply: "FCM v1 ready" to continue to API endpoint development


Debug Log (last 50 lines)
    [2] => API key required
)

--------------------------------------------------------------------------------
[2026-03-01 01:43:07] Database connected successfully
--------------------------------------------------------------------------------
[2026-03-01 01:43:24] Generating new FCM access token
--------------------------------------------------------------------------------
[2026-03-01 01:43:24] FCM access token generated successfully
--------------------------------------------------------------------------------
[2026-03-01 01:43:24] Sending FCM message
Array
(
    [token_preview] => fake_token_for_testi...
    [data] => Array
        (
            [test] => connectivity
            [timestamp] => 1772325804
        )

)

--------------------------------------------------------------------------------
[2026-03-01 01:43:24] FCM response
Array
(
    [http_code] => 400
    [response] => {
  "error": {
    "code": 400,
    "message": "Invalid value at 'message.data[1].value' (TYPE_STRING), 1772325804",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "message.data[1].value",
            "description": "Invalid value at 'message.data[1].value' (TYPE_STRING), 1772325804"
          }
        ]
      }
    ]
  }
}

    [curl_error] => 
)

--------------------------------------------------------------------------------