1.8 Alpha API and oAuth

I am trying to register our application to the CMS. I have added the application into the CMS.

I was looking through our code and it seems we were sending authorization request to services.php in the xibo folder of the previous version of Xibo. I now see the Authorization URL: /application/authorize and Token URL: /api/authorize/access_token, but where do we send all other request? Just to /api/index.php?

After trying to migrate to 1.8 from 1.7, our application throws an error about a missing table that was in the 1.7 version of the Xibo Database.

Currently when I try and communicate with the API I get an error with this:

SQL Error in OAuthStoreMySQL: Array ( [0] => 42S02 [1] => 1146 [2] => Table 'xibo18alpha.oauth_consumer_registry' doesn't exist )

The error suggest it is looking for a table “oauth_consumer_registry”. Why I don’t know, as this is not found in our code anywhere and does not exist in 1.8 anywhere. I did, however, find it in oAuthStoreAnyMeta.php AND oAuthStoreSQL.php.

So I noticed that the oAuth database tables in 1.8 seem different than what I have in at 1.7. Does 1.8 use oAuth 2.0?

This will be coming from your client application - perhaps your prior client shared a database with the CMS? If you’ve used a PHP application then you are most likely using an oAuth library which requires those tables.

If that is the case, then this should really be using a separate DB.

index.php

The base URL for the API is /api - if you look at the swagger-ui document you will see all the end points with their various URLs:

The completed API is RESTFul, meaning GET, POST, PUT and DELETE to /api/campaign are all valid and do diffeent things.