Is it required to Register a Terminal App before testing Poynt Cloud Messaging?


After creating a sample application as described in here -> Here,If I try to send a cloud message using Post request, I get an unauthorized access error
as below

{ "code": "UNAUTHORIZED_ACCESS", "httpStatus": 401, "message": "Access not authorized for the requested resource.", "developerMessage": "co.poynt.samples' does not match sender application package name." }

postman request body as follows

{ "deviceId":"----------------------------------", "businessId":"----------------------------------", "storeId":"----------------------------------", "recipient":{ "packageName":"co.poynt.samples", "className":"MyBroadcastReceiver" }, "ttl":500, "data":"test Message" }
Any reason why this might fail? Do I need to create a Terminal App on
this and register my app package name before sending a message?

Testing cloud messaging with on-terminal app

I have registered my app on
And tried using the sample python application provided by poynt as mentioned in the tutorial. But this time it shows this error

POST HTTP RESPONSE CODE:401 HTTP RESPONSE CODE:{"code":"UNAUTHORIZED_ACCESS","httpStatus":401,"message":"Access not authorized for the requested resource.","developerMessage":"Unauthorized access attempt. This principal does not have access to this resource.","requestId":"5b5ea3f8-85a8-4e17-9e60-a3354857e4ae"} RESPONSE TIME: 1289.659 msecs Request merchant authorization by sending them to:

What should I do

DO I Need to Submit the app for Review to use cloud messaging


Hi there,

We currently have to manually enable app ids to send cloud messages. We’ll get yours enabled today and I will let you know when you can run your test.

1 Like

Thank you @dennis eagerly waiting to test the app


We’ve enabled your app id. One more thing you will need to do is create an authorization URL as explained in step 8.1 of, log in and authorize access using your test merchant (use the same credentials as what you use for your dev org).
All of this will be taken care of automatically when an app is installed by merchants.

1 Like

Thanks for the reply, I am able to send an action successfully through cloud messaging

poyntAPI.sendCloudMessage(BUSINESS_ID, STORE_ID, "", "", "{\"action\":\"authorize\", \"purchaseAmount\": 1000, \"tipAmount\": 100, \"currency\":\"USD\", \"referenceId\":\"ABC1234\", \"orderId\":\"hello-order-id\", \"callbackUrl\":\"\"}")

But still I am unable to send a simple message,

#poyntAPI.sendCloudMessage(BUSINESS_ID, STORE_ID, "com.test.samples1991", "com.test.samples1991.MyBroadcastReceiver", "Hello from the cloud.")

Once I send the request I get a response as follows

POST HTTP RESPONSE CODE:401 HTTP RESPONSE CODE:{"code":"UNAUTHORIZED_ACCESS","httpStatus":401,"message":"Access not authorized for the requested resource.","developerMessage":"com.test.samples1991' does not match sender application package name.","requestId":"44ed3f88-ae88-4dc7-bcca-04a7b6d6f1c1"} RESPONSE TIME: 2159.947 msecs Request merchant authorization by sending them to:

I have authorized the url and the callback url is redirected successfully.


I’m not using the Certificates That I got during terminal app creation,
The app Id and the package name I’ve sent Poynt support to enable the app are as follows

  • Terminal App ID (Not Cloud App ID)

  • Package Name of the terminal app that uses the BroadcastReceiver class for cloud messaging as explained in here


You have to use the public/private key pair that was issued for your terminal app id, otherwise your call will fail. If you did not download the keypair you can reset it on


I’ve set the following in file

APPLICATION_ID -> cloud app ID PRIVATE_KEY_FILE -> private key obtained from terminal app PUBLIC_KEY_FILE -> public key obtained from terminal app
and I have set the following in getAccessToken() method

payload = { 'exp': expiryDatetime, 'iat': currentDatetime, 'iss': 'terminal app ID',<------ Terminal App ID 'sub': self.applicationId, <----- Cloud App ID 'aud': '', 'jti': str(uuid.uuid4()) }

and now I get a response as follows

RESPONSE TIME: 1218.033 msecs
Successfully sent cloud message.
But I am still not getting any push notification to the device. Please note that I’m using Genymotion as the emulator


Can you do “adb logcat” and rerun the script? You should see log entries if the cloud message is making it to the emulator.
Can you also post your receiver class configuration as you have it in your app’s manifest?


I have verified that cloud messaging is working properly in the emulator. Things to double check on your side:

  1. Receiver class configuration in app manifest is correct (

  2. You are specifying correct package name and receiver class name in the cloud message

  3. You can see the cloud message reaching your emulator when you tail logcat. You should see something like this:

    02-16 10:07:55.875 I/POYNT-EVENT( 2310): {“time” : “2016-02-16T18:07:55Z”, “type” : “WEBSOCKET”, “resource” : “”, “status” : “INFO”, “processingTime” : 0.0, “method” : “”, “apiStatusCode” : 0, “apiEndpoint” : “”, “sdkErrorCode” : 0, “data” : “co.poynt.api.model.CloudMessage”}
    02-16 10:07:55.875 I/POYNT-EVENT( 2310): {“time” : “2016-02-16T18:07:55Z”, “type” : “CLOUD_MESSAGE”, “resource” : “urn:tid:9d8646a0-4088-3e88-816d-67d26862dd0e-6”, “status” : “INFO”, “processingTime” : 0.0, “method” : “MSG_RECEIVED”, “apiStatusCode” : 0, “apiEndpoint” : “”, “sdkErrorCode” : 0}


Thanks @dennis it’s working I just received the message,

I/POYNT-EVENT( 1022): {"time" : "2016-02-17T04:04:36Z", "type" : "WEBSOCKET", "resource" : "", "status" : "INFO", "processingTime" : 0.0, "method" : "", "apiStatusCode" : 0, "apiEndpoint" : "", "sdkErrorCode" : 0, "data" : "co.poynt.api.model.CloudMessage"}
I/POYNT-EVENT( 1022): {"time" : "2016-02-17T04:04:36Z", "type" : "CLOUD_MESSAGE", "resource" : "urn:tid:165841fb-0b91-3757-856f-ca7fc56b76b8-17", "status" : "INFO", "processingTime" : 0.0, "method" : "MSG_RECEIVED", "apiStatusCode" : 0, "apiEndpoint" : "", "sdkErrorCode" : 0}
D/MyBroadcastReceiver( 1628): Got cloud Message: Hello from the cloud.

And this is my manifest.xml

            android:exported="true" >
                <action android:name="poynt.intent.action.CLOUD_MESSAGE_RECEIVED" />
                <category android:name="poynt.category.CLOUD_MESSAGE" />

Broadcast Receiver class

 public MyBroadcastReceiver() {
    public void onReceive(Context context, Intent intent) {
        Log.d("MyBroadcastReceiver", "Got cloud Message: " + intent.getStringExtra(Intents

Awesome! Looking forward to seeing your app in action.

1 Like

Hi Dennis,
Can you enable please this applicationId to send Cloud Notifications?
Thank you.

1 Like


Can you login to and go to Developer > Cloud Apps and then click on Manage (wrench icon) for your application. Use your test merchant to log in on the merchant login URL to authorize your app id.

1 Like

Hi Dennis, i have done that but i still receive the 401 error code:
{ "code": "UNAUTHORIZED_ACCESS", "httpStatus": 401, "message": "Access not authorized for the requested resource.", "developerMessage": "co.poynt.thinkpink.MyBroadcastReceiver' does not match sender application package name.", "requestId": "89a75677-af4e-48bd-a70d-b52517fff4f5" }

I have granted the permissions, in fact all permissions but still get this error. Meantime when i come back to the cloud app page, the grant permissions combo box always has the selected option “grant to test merchant…” is this the normal behaviour?

1 Like

Hi Paulo,

urn:aid:be349d34-f943-4c79-b5c0-93852b7e076f is a cloud app id. It cannot be used to send messages to an application running on the terminal because it is not associated with your app’s package name.

This is a bit of a manual process at the moment. So what you need to do it upload your app’s apk at Once you do that you will be issued a new app id which will be associated with your app’s package name (Note: your package name should not start with “co.poynt” which is reserved for Poynt apps) and a private key.

After that you will need to use your test merchant to authorize the app id to send cloud messages. This is step 8 at

1 Like

Thank you Dennis! It’s working now :smile:

1 Like

Hi @dennis just wanted to verify if cloud messaging would work with android studio emulator.


Yes, cloud messaging works with the emulator.