Loomio
Wed 8 Apr 2020 8:09PM

Access token for API service

O Obi Public Seen by 30

Hello everyone :)

I've just setup Loomio docker on a personal server and now I am trying to integrate some of the functions into my custom portal in PHP (functions such as listing latest non-public discussions in widgets etc).

In a Loomio API manual (https://help.loomio.org/en/dev_manual/using_the_api/) that I've been following I've noticed that we can use the access token to authenticate API requests to Loomio, but I couldn't find a way to create any keys for oauth2.

I was planning on using https://github.com/thephpleague/oauth2-client for this, but I am willing to use any other php solution if this one doesn't fit.

I've read somewhere that we can create the access keys using URL https://<your_loomio_hostname>/apps/registered but I get "We were unable to find that. It may have been deleted or moved."). Do I need to setup something else for this link to work?

I would really appreciate some help on this matter.

I thank you in advance.

RG

Robert Guthrie Wed 8 Apr 2020 8:37PM

Hi @Obi , the access_token stuff has been removed, as nobody was using it and I was getting security warnings about it.

The best way to use the api is to login and get a session cookie, then pass that cookie along with your api requests.

Does that make sense?

RG

Robert Guthrie Wed 8 Apr 2020 8:37PM

There is example code around where someone is doing this, I'm trying to find out where it was now.

RG

Robert Guthrie Wed 8 Apr 2020 8:51PM

O

Obi Wed 8 Apr 2020 8:53PM

Hey Rob,

This is probably going to help. I'll report back once I test it out. Thank you :)