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

Working fine with postman but not working with previous code #654

Closed
kapilkarda opened this issue Feb 25, 2016 · 9 comments
Closed

Working fine with postman but not working with previous code #654

kapilkarda opened this issue Feb 25, 2016 · 9 comments

Comments

@kapilkarda
Copy link

After migration it is not working when I tried with Postman I have to pass APP ID and Master Key in that but when I tried to work with Parse.initialize and Parse.serve it gives me unauthorized error

Please Help me in that.

@kapilkarda
Copy link
Author

Even it is not working
var TestObject = Parse.Object.extend("_User");
var testObject = new TestObject();
testObject.save({foo: "bar"}).then(function(object) {
alert("yay! it worked");
});

@simonbengtsson
Copy link
Contributor

If you are running the latest version of parse server the unauthorized error most likely means that the app id or keys are incorrect. Can you double check this? If they are correctly set can you post the request you are making with postman and your parse server config?

@kapilkarda
Copy link
Author

Thanks @simonbengtsson for your reply,

Yes, I checked both both(Server side and Client Side) APP ID is same but I am still getting unathorized I think I have to pass MasterKey from client side becuase when I tried to call postman where I have to call MasterKey without maskerkey it doesn't work.

@simonbengtsson
Copy link
Contributor

Strange! Can you share you server config and the request you are doing?

@kapilkarda
Copy link
Author

Parse.initialize("APP_ID");
Parse.serverURL = 'https://blanc.herokuapp.com/parse';
var TestObject = Parse.Object.extend("_User");
var testObject = new TestObject();
testObject.save({foo: "bar"}).then(function(object) {
alert("yay! it worked");
});

@simonbengtsson
Copy link
Contributor

Looks correct, what about the parse-server config?

@kapilkarda
Copy link
Author

var api = new ParseServer({
databaseURI: databaseUri,
appId: 'XXXXXXXXXX',
masterKey: 'XXXXXXXXXX',
clientKey: 'XXXXXXXXXX',
serverURL: 'https://blanc.herokuapp.com/parse'
});

@simonbengtsson
Copy link
Contributor

Try removing the clientKey.

@kapilkarda
Copy link
Author

Yes, Its working.

Thank you Very Much @simonbengtsson

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

3 participants