0

I've been trying to configure push-proxy on my server.i have done complete installation from here mattermost-push-proxy

After installation my server is running but when i want to test notification from curl

curl http://172.104.182.36:8066/api/v1/send_push -X POST -H "Content-Type: application/json" -d '{ "message":"test", "badge": 1, "platform":"android", "server_id":"c5brhfxaeb8o3qkcc3dfc47coy", "device_id":"android:el99uTDjv0A:APA91bGnVbuZl9W2lQSSokXYECVa4Tgt-wrnOxQFh4r51pzdDaFxbXUrJXQgmcSaPYToyIA5Dc9CCLPvYPNBF8bnrZdCjOSIaJmgB0Uhusj-8IoVCtFfAkF_l_PfRq0TMQf7L_RYMLqo"}'

I got this error:

{"error":"unknown transport error","status":"FAIL"}

please help me. thanks

coder
  • 540
  • 1
  • 5
  • 17
  • That error occurs when the push proxy receives a failure from the Android push notification servers. Are you sure your Android API key is configured correctly, and the device ID is correct? – George Aug 24 '17 at 10:04

1 Answers1

0

First ensure that your config file has the appropriate certificates and ApiKeys like:

{
    "ListenAddress":":8066",
    "ThrottlePerSec":300,
    "ThrottleMemoryStoreSize":50000,
    "ThrottleVaryByHeader":"X-Forwarded-For",
  "EnableMetrics": false,
    "ApplePushSettings": [
        {
            "Type" : "apple_rnbeta",
            "ApplePushUseDevelopment": false,
            "ApplePushCertPrivate": "./config/aps_rnbeta_production_priv.pem",
            "ApplePushCertPassword": "",
            "ApplePushTopic": "com.mattermost.rnbeta"
        },
        {
            "Type" : "apple",
            "ApplePushUseDevelopment": false,
            "ApplePushCertPrivate": "./config/aps_rn_production_priv.pem",
            "ApplePushCertPassword": "",
            "ApplePushTopic": "com.mattermost.rn"
        }
    ],
    "AndroidPushSettings": [
        {
            "Type" : "android_rn",
            "AndroidApiKey": "AIzaSyA1sl9LXXXxXXXxXXXxXXXxX_XXXXXX"
        },
        {
            "Type" : "android",
            "AndroidApiKey": "AIzaSyA1sl9LXXXxXXXyXXXxXXXyX_XXXXYY"
        }
    ]
}

That being said just because you are using your own push-proxy server you need to build and compile the apps yourself so that the above certificates and Android ApiKeys match with your registered device tokens.

when building the app yourself don't forget to change the bundleId on iOS and packageId on Android so they also match with your certificates and keys.

AlessioX
  • 3,167
  • 6
  • 24
  • 40
enahum
  • 16
  • 1