I have this :
curl https://address --user appID:appKey -d grant_type=password -d scope=read -d format=json -d username="username" -d password="password"
and I try to convert it in swift. Can you help me please?
There is no link between the username and the password and the appId and the appKey
I already have that :
private func LoadKey() {
var params : [String:String] = ["grant_type":"password",
"scope":"read",
"format":"json",
"username":"myUsername",
"password":"myPassword"]
Alamofire.request(url, method: .post, encoding: JSONEncoding.default).responseJSON { (response) in
print(response.result.value)
}
}
and I have no idea about how give the appId and appKey
Thank you in advance for your answer and have a good day.