Can't get API to work on hosted

I am on a trial (https://roli.xibo.co.uk/, Version 2.3.3), trying to get to know the API.

I am trying to get API access without login in as a specific user, not sure if I am misunderstanding oAuth or the capabilities of the api here. I have no experience with oAuth.

I so far I:

  • created an application, where I can get a client ID and a client Secret
  • checked checkbox authentication code (not sure about the exact name in english, as my locale is set to DE and I see no option to change that)
  • checked checkbox client login data
  • under the permissions tab, selected checkbox all
  • and set owner to myself

Now I went to the documentation for the api: Swagger UI

Where I tried to authorize there directly:

This returns an unknown route error:

{"error":404,"message":"Unknown Route","property":null,"help":null}

So using an API Tool I tried to authorize, though to be honest I never used oauth2, but not sure if I have the right URL

Any call to https://xibo.org.uk/api/authorize returns above error.

A call to https://xibo.org.uk/authorize
returns
{ "error": "invalid_client", "message": "Client authentication failed" }
So is this maybe the right endpoint?

A call to https://roli.xibo.co.uk/api/authorize
returns:
{ "error": { "message": "Page not found", "code": 404, "data": [] } }

So not sure, which endpoint I need to use, and what I need to fiddle with to get this right. It would be awesome to have an example, of what the authorize request should look like.

But maybe I missunderstood oauth2 Login completely. I currently just want to get access to the API without a user logging in / doing an authorization and all that jazz. Is that even possible? I just want access to the API.

Hi,

I think its just a bit of a misunderstanding - you want to connect to the API on your own CMS, not the API on xibo.org.uk.

So the URL’s you need to use are https://roli.xibo.co.uk/api/authorize

You want to use “client credentials” option, which means you provide a clientId/secret to an endpoint to get an access token, which you can use to access the API.

A useful guide is here: API Introduction with Postman
Although its for 1.8, the mechanism is the same.

1 Like

Thank you. With the guide it was then very easy. I think I actually had the right configuration, but one of the issues was, that I sent that clientId and Secret in the request body, but apparently not as form-data as it was needed. The Postman importt file was very helpful.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.