Access Forbidden (403) error when calling API in online sandbox environment


#1

After the following steps:

  1. create a DF instance in online sandbox environment;
  2. create admin account;
  3. import Address Book demo app (from https://raw.github.com/dreamfactorysoftware/android-sdk/master/package/add_android.dfpkg);
  4. create Role name “User” and allow it to access any service, resource and API actions;
  5. configure “User” service from Services tab and enable open registration and keep “Open Reg Email Service Id” with blank value.
  6. logout admin account and register a new user, with email, name and password.
  7. login with admin account and check the new user is created, active.
  8. create POST call on /user/session/ with new user’s username and password. API return is OK and get a valid session id.
  9. use the session id to create GET method on /db/_table/contact_group/. API return with 403 error.

The detailed error message is pasted below.
{
error: {
context: null
message: "Access Forbidden."
code: 403
trace: [46]
0: "0 [internal function]: DreamFactory\Http\Middleware\AccessCheck->handle(Object(Illuminate\Http\Request), Object(Closure))"
1: "1 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
2: "2 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
3: "3 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
4: "4 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))"
5: "5 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(69): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘handleGET’)"
6: "6 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Route.php(201): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘DreamFactory\Ht…’, ‘handleGET’)"
7: "7 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))"
8: "8 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(704): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))"
9: "9 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))"
10: "10 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
11: "11 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
12: "12 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
13: "13 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(706): Illuminate\Pipeline\Pipeline->then(Object(Closure))"
14: "14 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(671): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))"
15: "15 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(631): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))"
16: "16 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))"
17: "17 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))"
18: "18 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
19: "19 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/barryvdh/laravel-cors/src/HandleCors.php(43): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
20: "20 [internal function]: Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))"
21: "21 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
22: "22 /var/www/_releases/instance/dreamfactory/2.0.0-beta/app/Http/Middleware/FirstUserCheck.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
23: "23 [internal function]: DreamFactory\Http\Middleware\FirstUserCheck->handle(Object(Illuminate\Http\Request), Object(Closure))"
24: "24 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
25: "25 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
26: "26 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))"
27: "27 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
28: "28 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
29: "29 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))"
30: "30 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
31: "31 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
32: "32 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))"
33: "33 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
34: "34 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
35: "35 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))"
36: "36 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
37: "37 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
38: "38 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))"
39: "39 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
40: "40 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
41: "41 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
42: "42 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))"
43: "43 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))"
44: "44 /var/www/_releases/instance/dreamfactory/2.0.0-beta/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))"
45: “45 {main}”

}-
}

Is there anything I missed or did it in a wrong way?


#2

Latest error message is not same as the one above. I test the API this afternoon, the result is:

{
error: {
context: null
message: "SQLSTATE[HY000] [1045] Access denied for user ‘df_admin’@‘localhost’ (using password: YES)"
code: 1045
trace: [72]
0: "0 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(55): PDO->__construct(‘mysql:host=loca…’, ‘df_admin’, ‘df_admin’, Array)"
1: "1 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(22): Illuminate\Database\Connectors\Connector->createConnection(‘mysql:host=loca…’, Array, Array)"
2: "2 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(60): Illuminate\Database\Connectors\MySqlConnector->connect(Array)"
3: "3 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(49): Illuminate\Database\Connectors\ConnectionFactory->createSingleConnection(Array)"
4: "4 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(175): Illuminate\Database\Connectors\ConnectionFactory->make(Array, ‘11018b5586565ca…’)"
5: "5 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(67): Illuminate\Database\DatabaseManager->makeConnection(‘11018b5586565ca…’)"
6: "6 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3245): Illuminate\Database\DatabaseManager->connection(NULL)"
7: "7 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3211): Illuminate\Database\Eloquent\Model::resolveConnection(NULL)"
8: "8 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1914): Illuminate\Database\Eloquent\Model->getConnection()"
9: "9 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1857): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()"
10: "10 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1831): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()"
11: "11 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3457): Illuminate\Database\Eloquent\Model->newQuery()"
12: "12 [internal function]: Illuminate\Database\Eloquent\Model->__call(‘whereName’, Array)"
13: "13 [internal function]: DreamFactory\Core\Models\Service->whereName(‘user’)"
14: "14 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3473): call_user_func_array(Array, Array)"
15: "15 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/dreamfactory/df-core/src/Models/Service.php(260): Illuminate\Database\Eloquent\Model::__callStatic(‘whereName’, Array)"
16: "16 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/dreamfactory/df-core/src/Models/Service.php(260): DreamFactory\Core\Models\Service::whereName(‘user’)"
17: "17 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(205): DreamFactory\Core\Models\Service::DreamFactory\Core\Models{closure}()"
18: "18 [internal function]: Illuminate\Cache\Repository->remember(‘service:user’, ‘300’, Object(Closure))"
19: "19 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(310): call_user_func_array(Array, Array)"
20: "20 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(216): Illuminate\Cache\CacheManager->__call(‘remember’, Array)"
21: "21 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(216): Illuminate\Cache\CacheManager->remember(‘service:user’, ‘300’, Object(Closure))"
22: "22 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/dreamfactory/df-core/src/Models/Service.php(270): Illuminate\Support\Facades\Facade::__callStatic(‘remember’, Array)"
23: "23 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/dreamfactory/df-core/src/Models/Service.php(270): Illuminate\Support\Facades\Cache::remember(‘service:user’, ‘300’, Object(Closure))"
24: "24 /var/www/_releases/instance/dreamfactory/2.0.0-beta/app/Http/Middleware/AccessCheck.php(317): DreamFactory\Core\Models\Service::getCachedByName(‘user’)"
25: "25 /var/www/_releases/instance/dreamfactory/2.0.0-beta/app/Http/Middleware/AccessCheck.php(172): DreamFactory\Http\Middleware\AccessCheck::setExceptions()"
26: "26 [internal function]: DreamFactory\Http\Middleware\AccessCheck->handle(Object(Illuminate\Http\Request), Object(Closure))"
27: "27 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
28: "28 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
29: "29 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
30: "30 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))"
31: "31 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(69): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘handlePOST’)"
32: "32 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Route.php(201): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘DreamFactory\Ht…’, ‘handlePOST’)"
33: "33 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))"
34: "34 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(704): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))"
35: "35 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))"
36: "36 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
37: "37 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
38: "38 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
39: "39 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(706): Illuminate\Pipeline\Pipeline->then(Object(Closure))"
40: "40 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(671): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))"
41: "41 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php(631): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))"
42: "42 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))"
43: "43 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))"
44: "44 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
45: "45 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/barryvdh/laravel-cors/src/HandleCors.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
46: "46 [internal function]: Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))"
47: "47 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
48: "48 /var/www/_releases/instance/dreamfactory/2.0.0-beta/app/Http/Middleware/FirstUserCheck.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
49: "49 [internal function]: DreamFactory\Http\Middleware\FirstUserCheck->handle(Object(Illuminate\Http\Request), Object(Closure))"
50: "50 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
51: "51 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
52: "52 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))"
53: "53 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
54: "54 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
55: "55 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))"
56: "56 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
57: "57 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
58: "58 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))"
59: "59 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
60: "60 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
61: "61 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))"
62: "62 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
63: "63 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
64: "64 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))"
65: "65 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)"
66: "66 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))"
67: "67 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))"
68: "68 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))"
69: "69 /var/www/_releases/instance/dreamfactory/2.0.0-beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))"
70: "70 /var/www/_releases/instance/dreamfactory/2.0.0-beta/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))"
71: “71 {main}”

}-
}

I think the local db service is SQLITE database, but why the error is occurred in “MySQLConnector”?


#3

No one have same issue here?


#4

I finally find a Windows desktop to install. The issue is also there. After deeply investigating, the problem is caused by API Key. Even the database is created by Demo Address Book app. When you call the API, you could not use the API Key of Address Book app. You need to use API Key of predefined app “swagger”. Is it correct?


#5

You should be able to use the API Key for the address book app but you need to assign the role you created to your user for this address book app. Go to ‘Users’ tab -> select your user from the list -> Go to ‘Roles’ tab -> Select your role for the address book app. Update and try accessing your API with both API Key and Session Token.

GET http://your-url/api/v2/db/_table/contact_group/?api_key=&session_token=

If you still get access forbidden then check your role setup.


#6

I am quite sure that I have already done this. That is why I raised the issue here. I have a Role named “User”, the user is assigned to this Role and in “Roles” tab of that user the Role “User” is selected for address book app.


#7

I have tested it again carefully. I created different instances in online sandbox environment and installed locally on Windows and Linux desktop. It is related to the order that you register the user first or import the app first. The issue happens when you register user first. If it works correctly, after you import address book, “Users”->“Roles”->“AddressBook for Android” should be “No Rule Selected”. Then you select the role you created and update, everything will be OK. But sometime (especially in online sandbox environment), after you import the address book demo, when you check “Users”->“Roles”->“AddressBook for Android”, it is already assigned to the role you created before. Then you check the API, you will got the “403” error. To correct it, you need navigate to “Users”->“Roles”->“AddressBook for Android” and select that role in dropdown menu again and update. Finally, it works all right.