I’m trying to consume the DreamFactory server services, but still unsuccessful.
I followed several posts of similar problems and tutorials, but I continue with the problem.
I’ve created a service that sends email using my Google account. Inside the DF server (PHPAdmin), it works, but I want to test the service through PostMan and it shows the error 403 (Forbidden)
Eduardo,
The API Key you appear to be using is for your SendMailGoogle application, but should be your API Key from the API_Docs application that DreamFactory builds natively. Without it, the authentication fails when called from Postman.
The reason you’re getting a 403 is because without the session token, you do not have permission to access the service (from your screenshots I am assuming you want the user to be logged in to do so). From your screenshots it looks like you are setting up the API key correctly (it should be the SendMailGoogle key, as this is the application you have assigned your user the liberado role in), but you need to authenticate the user by adding the session token. This is easily done in Postman by setting the X-DreamFactory-Session-Token header, as shown in your last screenshot (the same process as for the API key). To get the session token value, you can perform a login request and look for the session token in the information returned.
EDIT:
Sorry I didn’t look closely enough at your 7th screenshot, I see now that you can’t even get a session token.
The API Key should still be that of your application (SendMailGoogle). Assuming you have POST access as one of the 5 selected in the 3rd screenshot, it should work. You could try specifically adding POST access to the ‘session’ component of the ‘user’ service for the liberado role.