Access REST API which requires auth

177 views
Skip to first unread message

Vinz

unread,
Apr 9, 2017, 5:00:01 PM4/9/17
to OpenRefine
Hi there,

I love the easy way to retrieve information into open refine via REST API & GET from public endpoints.

How would I be able e.g. to request data from google Analytics API or Twitter API which require authentication?


Appreciate any idea.

Thanks

Antonin Delpeuch (lists)

unread,
Apr 10, 2017, 9:11:25 AM4/10/17
to openr...@googlegroups.com
Hi Vinzent,

It depends how the API authenticates you. If it expects an API key as a
GET parameter, then just input this key in the URL. If the API requires
a specific header, then as far as I can tell it is not supported yet -
feel free to open an issue about that. A possible workaround would be to
write a simple wrapper (a local HTTP server that adds the authentication
header to the queries it gets and passes them on to the original API).
This takes a few lines in Python.

Cheers,
Antonin

On 09/04/2017 21:11, Vinz wrote:
> Hi there,
>
> I love the easy way to retrieve information into open refine via REST
> API & GET from public endpoints.
>
> How would I be able e.g. to request data from *google Analytics API* or
> *Twitter API* which require *authentication*?
>
>
> Appreciate any idea.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenRefine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openrefine+...@googlegroups.com
> <mailto:openrefine+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Ettore Rizza

unread,
Apr 11, 2017, 5:59:30 AM4/11/17
to OpenRefine
I would also be interested in a solution. Oauth1, used by Twitter, is complicated and difficult to reproduce in the form of a URL. I also tried with Python / Jython by using the requests_oauth library, but it seems that there is a bug with Jython, which fails to import a module correctly.

Antonin Delpeuch (lists)

unread,
Apr 11, 2017, 6:42:52 AM4/11/17
to openr...@googlegroups.com
I have created an issue about that:
https://github.com/OpenRefine/OpenRefine/issues/1187

Antonin

On 11/04/2017 10:59, Ettore Rizza wrote:
> I would also be interested in a solution. Oauth1, used by Twitter, is
> complicated and difficult to reproduce in the form of a URL. I also
> tried with Python / Jython by using the requests_oauth library, but it
> seems that there is a bug with Jython, which fails to import a module
> correctly.
>
> <https://lh3.googleusercontent.com/-sydpEREvMbo/WOyo6R1UV3I/AAAAAAAATw4/Exm3G1l48msJnU8XJDr1SjYO2Md1fYi9ACLcB/s1600/Capture.JPG>
>
>
>
> Le dimanche 9 avril 2017 23:00:01 UTC+2, Vinz a écrit :
>
> Hi there,
>
> I love the easy way to retrieve information into open refine via
> REST API & GET from public endpoints.
>
Reply all
Reply to author
Forward
0 new messages