I'm trying to auth with FPL api can anyone help me with the below, I could not find what is wrong
here is the authentication guide https://medium.com/@bram.vanherle1/fantasy-premier-league-api-authentication-guide-2f7aeb2382e4
I get this error
status: 200
statusText: "OK"
url: "https://cors-anywhere.herokuapp.com/https://users.premierleague.com/accounts/login/"
ok: false
name: "HttpErrorResponse"
message: "Http failure during parsing for https://cors-anywhere.herokuapp.com/https://users.premierleague.com/accounts/login/"
import { HttpClient } from '@angular/common/http';
constructor(private http: HttpClient) {}
getData() {
const proxy = 'https://cors-anywhere.herokuapp.com/';
this.http
.post(${proxy}https://users.premierleague.com/accounts/login/,
{
redirect_uri: 'https://fantasy.premierleague.com/a/login',
app: 'plfpl-web',
login: 'my-email',
password: 'may-pass'
}
)
.subscribe((data) => {
console.log(data);
});
}
}