Issue #12 invalid

NMA API-key problem

Anonymous created an issue

I am using this example for for sending a NMA notification. I have used the code in same way as specified in the example except replacing the api_key with mine.

but this is what i get in result ...

pushnotify.nma.Client-DEBUG: _post sending data: {'application': 'pushnotify', 'developerkey': u'test', 'apikey': '2c915ad167d9233dbf0c8a6e98c58340c3d95c2c3d98df80', 'event': u'testing', 'description': u'testing nma notification'} pushnotify.nma.Client-DEBUG: _post sending to url:

when i click the URL i read

<nma><error code="400">Parameter 'apikey' not provided.</error></nma>

Can you pleasse help on why i am not able to get the notification? I verified the key is correct for me account ( i changes the key here..since did no want to post my psronal key here)

Comments (2)

  1. Jeffrey Goettsch repo owner

    Try this code. Assign your API Key to NMA_PROVIDER_KEY and tell me what happens.

    import logging
    import pushnotify
    def main():
        logger = logging.getLogger('pushnotify')
        formatter = logging.Formatter('%(name)s-%(levelname)s: %(message)s')
        handler = logging.StreamHandler()
        NMA_PROVIDER_KEY = '2c915ad167d9233dbf0c8a6e98c58340c3d95c2c3d98df80'
        client = pushnotify.get_client('nma', '', 'foo')
        message = 'The message has been sent to your notify my Android client.'
        result = client.notify('message', 'test event', split=True)
        if result:
            print('This did not work!')
    if __name__ == '__main__':
  2. Log in to comment