instaR icon indicating copy to clipboard operation
instaR copied to clipboard

Bad Request (HTTP 400). Failed to get an access token.

Open aminrigi opened this issue 8 years ago • 3 comments

I followed the tutorial from https://github.com/pablobarbera/instaR/blob/master/examples.R

and ran the code:

 app_id <- "AAAAAA"

app_secret <- "YYYYYXXXXYYY"

token <- instaOAuth(app_id, app_secret)

I receive this in the console:

Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Error in oauth2.0_access_token(endpoint, app, code = code, user_params = user_params,  : 
  Bad Request (HTTP 400). Failed to get an access token.

I already put http://localhost:1410/ as a valid redirect URI in instagram.

This is my sessionInfo

R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252 
[2] LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252
[4] LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] instaR_0.2.4 jsonlite_1.5 httr_1.3.1  

loaded via a namespace (and not attached):
[1] compiler_3.4.3 R6_2.2.2       tools_3.4.3    curl_3.1      
[5] yaml_2.1.16    Rcpp_0.12.15   httpuv_1.3.5

aminrigi avatar Feb 07 '18 04:02 aminrigi

Same problem here. Do you solve the problem?

BonnyRead avatar Apr 03 '19 02:04 BonnyRead

Good Day all. I was hoping to see if anyone had encountered a 'fix' or further information regarding this? I too am attempting a similar method of connecting much like aminrigi, but am still receiving the same error.

ShanePheiffer avatar Aug 28 '19 11:08 ShanePheiffer

Just stumbled upon the same thing. I'm not sure this package is being updated anymore. Specially since september, there were changes in the Instagram API

heinzsteinhoff avatar Nov 09 '20 14:11 heinzsteinhoff