Face++'s JavaScript demo doesn't work even though I got api key and api secret

81 views Asked by At

I've been working on Face++'s JavaScript demo in the SDK. Face++ is a face detection api made in China I'd like to ask to people who worked on this api. The SDK: https://github.com/FacePlusPlus/facepp-javascript-sdk

I registered and got my free version of api key and api secret.

I followed the read me and tried the face detection. But even though I put my api key and api secret at line4 and 5 in the common.js, the demo doesn't work with my uploaded photo.

I always get error says

[Error] Origin http://127.0.0.1:3000 is not allowed by Access-Control-Allow-Origin.
[Error] XMLHttpRequest cannot load https://api-cn.faceplusplus.com/facepp/v3/detect due to access control checks.
[Error] Failed to load resource: Origin http://127.0.0.1:3000 is not allowed by Access-Control-Allow-Origin. (detect, line 0)

or just callback function failed()

Is this because my plan is free type? Or I missed something else? Thanks in advance:))

0

There are 0 answers