genesluder / python-apns

A library for interacting with APNs using HTTP/2 and token-based authentication.
MIT License
90 stars 50 forks source link

gobiko.apns.exceptions.TopicDisallowed #6

Closed nicolaslauquin closed 7 years ago

nicolaslauquin commented 7 years ago

I tried launching the tool and i got an exception gobiko.apns.exceptions.TopicDisallowed. Did I missed something ?

  File "client.py", line 13, in <module>
    client.send_message("7f8d621ccc541666XXXXX", "this is my message")
  File "/Users/gros/Downloads/python-apns-master/gobiko/apns/client.py", line 66, in send_message
    return self._send_message(registration_id, alert, **kwargs)
  File "/Users/gros/Downloads/python-apns-master/gobiko/apns/client.py", line 168, in _send_message
    response = self._send_push_request(connection, registration_id, json_data, request_headers)
  File "/Users/gros/Downloads/python-apns-master/gobiko/apns/client.py", line 193, in _send_push_request
    raise ExceptionClass()
gobiko.apns.exceptions.TopicDisallowed

Configuration is:


client = APNsClient(
    team_id="GTWXXXXXXX",
    bundle_id="com.xxx.xxx.xxx",
    auth_key_id="J85XXXXXX",
    auth_key_filepath="/Users/xxx/ophtaplus.p8",
    use_sandbox=False,
    force_proto='h2'
)

client.send_message("7f8d621ccc5XXXXXXXXX", "this is my message")

Python 2.7.13

nicolaslauquin commented 7 years ago

Ok I think its means the token is incorrect, it worked with an another device ! I keep this issue so other user can get help with this answer.