[Instagram Connector] InstagramConnector AccessTokenGet Rest Service gives 400 bad request exception

[Instagram Connector] InstagramConnector AccessTokenGet Rest Service gives 400 bad request exception

  
Forge Component
(4)
Published on 2015-12-30 by João Pêgas
4 votes
Published on 2015-12-30 by João Pêgas

Hi,

I am using InstagramConnector espace for enabling social login to my Application. This connector uses Explicit (Server -side) Authentication to return an authorization token. 

AccessTokenGet REST API Method returns a response with the access token and the user details for a request in Plain Text format. Request has the following details

client_id= 

&client_secret=

&grant_type=authorization_code

&redirect_uri=

&code=

&scope=basic

When testing the service, I get a valid response with an access_token and the user details.

But when the service is run during the module execution, it returns a 400 Bad Request exception.

This happens in the InstagramConnectorDemo also.

Hi Neithu,

Probably Instagram have changed something on the Authentication API. I will try to have a look but I cannot commit with any date.


Hi Folks,

Had the same problem. It seems Instagram now requires the following headers:

Accept:application/json

Content-type: application/x-www-form-urlencoded

I had to touch the scope also.

In attach you'll find the modified version


Cheers


Thanks Rui! I'll take a look into that.