Face Verification

FREEMIUM
Verified
Por PresentID | Actualizada 8 days ago | Visual Recognition
Popularidad

9.5 / 10

Latencia

2,597ms

Nivel de servicio

99%

Health Check

N/A

Volver a todas las conversaciones

Using faceverification in Angular

Rapid account: Davebanguilan
davebanguilan
2 years ago

Hi,

How can I create a post request and retrieve the data in Angular? I currently have this code in my service where I pass the base64 data of the two images.

httpOptions = {
headers: new HttpHeaders({
‘content-type’: ‘application/x-www-form-urlencoded’,
‘X-RapidAPI-Key’: ‘<MY API KEY HERE>’,
‘X-RapidAPI-Host’: ‘<MY HOST HERE>’,
})
};

constructor(
private http: HttpClient
) {}

submitRequest(data1, data2): Observable<any> {
console.log(data1);
console.log(data2);
return this.http.post<any>
(‘https://face-verification2.p.rapidapi.com/faceverification’,
{ image1Base64: data1, image2Base64: data2 }, { headers: this.httpOptions.headers});
}

I keep on getting the error 400 and the error title says One or more validation errors occurred. . Let me know what am I missing here.

Thanks
Rapid account: Present ID
PresentID Commented a year ago

Hello, please send us the sample file you are using. Because generally, this error occurs due to a problem in the file or upload.
presentid.co@gmail.com

Rapid account: Davebanguilan
davebanguilan Commented 2 years ago

It also has this error message Failed to read the request form. Form key length limit 2048 exceeded.

Únase a la conversación, añada un comentario a continuación:

Inicie sesió/Regístrese para publicar nuevos comentarios