Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where shall I setup the api server? #2

Open
vincentgong7 opened this issue Mar 20, 2019 · 3 comments
Open

Where shall I setup the api server? #2

vincentgong7 opened this issue Mar 20, 2019 · 3 comments

Comments

@vincentgong7
Copy link

According to the README I did not find a way to set the API server properly. There are several API servers as far as I know, such as https://api-cn.faceplusplus.com/facepp/v3/detect and https://api-us.faceplusplus.com/facepp/v3/detect. Face++ may restrict queries to different API server with regard to their locations. In such case, setting API server is useful.

@yanminhui
Copy link
Owner

yanminhui commented Mar 21, 2019

According to the README I did not find a way to set the API server properly. There are several API servers as far as I know, such as https://api-cn.faceplusplus.com/facepp/v3/detect and https://api-us.faceplusplus.com/facepp/v3/detect. Face++ may restrict queries to different API server with regard to their locations. In such case, setting API server is useful.

@vincentgong7 It can be found on the class FacePP's construct function.

>>> from facepplib import FacePP

>>> facepp = FacePP(api_key='eFWami68yL25RPrSuG0oi0lFfYRle26L', 
...                 api_secret='Zf_obifstMlZTPmejoY1MHNKyioD_Jtz',
...		    url='https://api-us.faceplusplus.com')

The API server's host be setup by the parameter url.

@vincentgong7
Copy link
Author

vincentgong7 commented Mar 21, 2019 via email

@sbelharbi
Copy link

hi,
i installed this package as requested, pip install python-facepp.

$ pip show python-facepp
Name: python-facepp
Version: 0.1.0a5
Summary: Library for communicating with a Face++ facial recognition service
Home-page: https://github.com/yanminhui/python-facepp
Author: yanminhui
Author-email: [email protected]
License: MIT License
Location: /home/ens/AM90950/anaconda3/envs/fer/lib/python3.7/site-packages
Requires: requests

however, when i test it, i got this error about the api key:

$ python -m facepplib
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Face Detection]
Error: api_key and api_secret does not match. Please make sure you use correct api_key, api_secret and API URL

is there something to do after installing or something to do with the api credentials to be set?

info:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic
$ python --version
Python 3.7.16

thanks

@sbelharbi sbelharbi mentioned this issue Feb 1, 2023
Repository owner deleted a comment from alex-chan Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants