Zensavona / elixtagram

:camera: Instagram API client for the Elixir language (elixir-lang)

Home Page:https://hex.pm/packages/elixtagram

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unauthorised endpoints?

msp opened this issue · comments

Hey, new to the Elixir ecosystem, so not sure what I'm doing wrong? I'm using your example project and I though the tag command didn't need an access token?

Horus:instagram-phoenix-example msp$ iex -S mix phoenix.server
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

[info] Running InstagramPhoenixExample.Endpoint with Cowboy on http://localhost:4000
Interactive Elixir (1.2.2) - press Ctrl+C to exit (type h() ENTER for help)

iex(1)> Elixtagram.configure "XXX", "YYY","ZZZ.com"
{:ok, []}

iex(2)> Elixtagram.authorize_url!

"https://api.instagram.com/oauth/authorize/?client_id=XXX&redirect_uri=http%3A%2F%2FZZZ>com&response_type=code"

iex(3)> Elixtagram.tag("lifeisaboutdrugs")
** (Elixtagram.Error) OAuthAccessTokenException: The access_token provided is invalid.
(elixtagram) lib/elixtagram/api/base.ex:44: Elixtagram.API.Base.handle_response/1
(elixtagram) lib/elixtagram/api/tags.ex:13: Elixtagram.API.Tags.tag/2

Cheers

Hey there @msp - since the time of writing the README Instagram has severely locked down their API for those who don't already have an old key (I believe those old keys are being revoked soon also). There are no such thing as unauthenticated endpoints anymore.

See here for more info.

Thanks for the info :)