I am trying to make an autentication from R into a demo account that is using API REST and json.
Based on input from user, I have now digged into the httr and POST details and my code looks like this. When I look into the details it seems that the webclient test i perform is identical but the identfier and password is being sent in with " ". I have checked the documentation for httr, POST and body, but do not find that "" can be used where I need it. Any suggestions?.
POST (
url = "https://demo-api.ig.com/gateway/deal/session",
add_headers(
"X-IG-API-KEY" = "xxx",
"VERSION" = "2",
"X-SECURITY-TOKEN" = "xxx",
"CST" = "xxx",
"Content-Type" = "application/json; charset=UTF-8",
"Accept" = "application/json; charset=UTF-8"),
body = "{identifier: xxx, password: xxx}",
verbose())