How to Troubleshoot Android GCM 401 error?

后端 未结 3 2003
长情又很酷
长情又很酷 2020-12-14 10:28

I\'m getting many 401 Unauthorized errors when trying to connect to Google Cloud Message Server.

Our code was working for some time on

相关标签:
3条回答
  • 2020-12-14 10:49

    It might happen that IPv6 is used for the connection while only IPv4 is allowed. Make sure you have 'Any IP allowed' not just IPv4 0.0.0.0/0.

    0 讨论(0)
  • 2020-12-14 11:00

    After many checks and not finding a good result the only solution we could give was to create a new project (the 3rd one because we did it already before) with a new API key, and this 3rd time it works.

    0 讨论(0)
  • 2020-12-14 11:07

    I have solved my problem by creating new API Key under same project. Following this

    Go to Google developer console then Select project Credentials -> Create Credentials -> API Key -> Server Key then add your server ip address where your GCM server code hosted.

    After creating Api key it may takes 5 minutes to be workable

    0 讨论(0)
提交回复
热议问题