i use code bellow access class book on parse.com
public void getbook() { string requeststring = "https://api.parse.com/1/classes/book"; string applicationid = "my application id"; string restapikey = "my rest api key"; webrequest webrequest = webrequest.create(requeststring); networkcredential streetcred = new networkcredential(applicationid, restapikey); webrequest.credentials = streetcred; webrequest.method = "get"; webrequest.timeout = 100000; httpwebresponse b = (httpwebresponse)webrequest.getresponse(); }
this results in 401 unauthorized response. doing wrong ?
i found answer own question !
it appears required key (the second parameter in networkcredentials) should master key , not rest api key.
Comments
Post a Comment