Skip to content

403 Error on FilesRouter #1384

Closed
Closed

Description

@mcclaskiem

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.

Activity

  1. drew-gross commented on Apr 5, 2016

    @drew-gross
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions