Hello guys. I need to interact with a MoralisDB using Python, so I followed these steps:
1.Log In to Moralis and then create new dApp.
2.Go to App Settings>Database and created new one with these features:
-ClassName: GameScore
-first row: score (number)
-second row: playerName (string)
-third row: cheatMode (boolean)
3.I should create a new object using REST API. This is the code I use:
import http.client
import json
connection = http.client.HTTPSConnection('my.domain.name', 443)
connection.connect()
connection.request('POST', '/parse/classes/GameScore', json.dumps({
"score": 1337,
"playerName": "Sean Plott",
"cheatMode": False
}), {
"X-Parse-Application-Id": "APP-ID",
"X-Parse-REST-API-Key": "???",
"Content-Type": "application/json"
})
results = json.loads(connection.getresponse().read())
print results
So the ‘connection’ variable looks working because on python console it returns that the connecion works succesfully. The problem is when I try to fill the ‘X-Parse-REST-API-Key’ field. I don’t know what I should text. So I here asking two questions:
- Are all steps I did right?
2)Where can I retreive the REST API Key and let the script works succesfully?
Thank you in advance.