How to get an OAuth Request Token for Google using java

后端 未结 2 706
遇见更好的自我
遇见更好的自我 2021-01-03 13:19

I\'m struggling to fetch a request token from google when trying to access the APIs. I\'m receiving the standard 400 response. The request i\'m sending is almost identical t

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 14:01

    I would suggest using an OAuth library for this, in order to have a higher level of abstraction.

    Checkout the following blog post for an OAuth interaction using Signpost and j2se :

    http://blog.doityourselfandroid.com/2010/11/08/oauth-in-java-the-signpost-library/

    The blog also contains some other info regarding OAuth.

    Another important thing worth mentioning is to make sure your date/time settings are setup correctly on the client. When you interact with the service provider, and you end up sending wrong timestamps, your requests will get refused.

提交回复
热议问题