Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 Error on FilesRouter #1384

Closed
mcclaskiem opened this issue Apr 5, 2016 · 1 comment
Closed

403 Error on FilesRouter #1384

mcclaskiem opened this issue Apr 5, 2016 · 1 comment

Comments

@mcclaskiem
Copy link

I am using an afterDelete hook to handle deleting a File that is included in each object. From the hook I am using the following the code.

    Parse.Cloud.httpRequest({
        url: fileUrl,
        method: 'DELETE',
    }).then(function(response) {
        console.log(response);
    }, function(error) {
        console.log("AFTER DELETE ERROR!", error);
    });

However the DELETE is returning a 403 before the deleteHandler is even called. I see that the FileRouter is using a enforceMasterKey method but I am unsure how to alter my request to use the masterkey as Parse.Cloud.useMasterKey(); did not work.

@drew-gross
Copy link
Contributor

You pass the master key in the headers of the request. Check the JS SDK docs and Rest API docs. If you continue to have issues, please ask a question on Stack Overflow as this repo is for bugs in Parse Server, not implementation questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants