I have a table in one of my databases that I want to use to collect emails from users. Unregistered users should be able to insert records to this table, but not have access to any other part of Dreamfactory. Here’s my setup:
Default user: unregistered_user
Component: _table/email_signups/
Access: POST
Requestor: API
On my site, I use AJAX to make the following request:
$.ajax({
type : “POST”,
url : “https://SITE_NAME.com/api/v2/DB_NAME/_table/email_signups”,
headers : {‘X-DreamFactory-Api-Key’: API_KEY},
data : ‘{“resource”: [{“email”:"’ + emailAddress + ‘"}]}’,
success : function(response) { // Success handling code },
error : function(response) { // Error handling code }
);
The response that I’m getting is 404: Role not found. Any ideas?