Search for Resources and Solutions

Midrub Api Introduction

TheĀ Midrub Api uses theĀ Oauth 2.0 concept but i'm not using any external library for this. I've invented my way to allow the Api use in a dynamic way with all Midrub's components.

In the next Midrub's update i'm going to improve the Midrub's Api and after i will write more articles about the Api use. It's simple and is similar to other services Api.

The Midrub's Api has two ways to be used:

  • For mobile apps with predefined permissions. Redirects are not required.
  • For web use where users should approve the use of permissions, Redirects are required.


All ways has same access token creation process, but in web use redirects are required:

The endpoints which support post requests, should be added in the config.php file.

For example you can have this in config.php:

$config['csrf_exclude_uris'] = array();

If your endpoint has post's request support, add

$config['csrf_exclude_uris'] = array('your endpoint without main url');

Final:

$config['csrf_exclude_uris'] = array('oauth2/authorize', 'oauth2/token');


The Midrub Api requires attention on details.


Was this article helpful?