Question

I am trying to implement Feedly API using Scribe.

For requesting the access token, they have an additional parameter grant_type to be included in the POST request to POST /v3/auth/token as documented in:

http://developer.feedly.com/v3/auth/

How do I take this into account?

The implementation of OAuth20ServiceImpl suggests that these it only submits these parameters:
* CLIENT_ID
* CLIENT_SECRET
* CODE
* REDIRECT_URI
* SCOPE

I am getting error that grant_type is null while calling getAccessToken because of this.

Was it helpful?

Solution

One way of doing this is subclassing OAuth2ServiceImpl and overriding the sign method to add the missing parameter.

Then from your FeedlyApi class (that inherits DefaultApi20, I assume), override the createService method to return your service subclass.

This is a bit of a hassle, and maybe it's easier to do it from scratch. OAuth 2.0 having so many variations and being significantly easier than 1.0a is the reason why scribe is going to be 1.0a only in future versions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top