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

Error 1003 - Authorization Error #1

Open
TMMeijers opened this issue May 30, 2016 · 11 comments
Open

Error 1003 - Authorization Error #1

TMMeijers opened this issue May 30, 2016 · 11 comments

Comments

@TMMeijers
Copy link

Even though I have made an account, an app and use the key and secret key every request I make returns error code 1003: Authorization error.

I have tried both the Command Tool (with my keys in .cfg) and calling the API from my own code. All return the error just like the example hello.py program.

I have tried both the US and CN server (http://us.api.faceplusplus.com and http://us.api.faceplusplus.com) as well as http://usapi.faceplusplus.com which is listed under the MyApp page. All give back 404 but http://api.faceplusplus.com works (but unfortunately gives me the Authorization error).

@justinstaines
Copy link

Make sure in the facepp.py file the server name is http://apius.faceplusplus.com

i.e.

class API(object):
key = None
secret = None
server = 'http://apius.faceplusplus.com/'

@sanchishah
Copy link

Even though we used the server name 'http://apius.faceplusplus.com/' as mentioned, the authorization error (error code : 1003) still persists.

@snehasahu2626
Copy link

hey @sanchishah have you resolved the error . please let me know

@timhub
Copy link

timhub commented Jun 13, 2018

Same thing we have here on CN server, not only in python SDK, also found in java SDK.

@liumusicforever
Copy link

liumusicforever commented Jun 25, 2018

I also met same problem , and I found two causes of this problem were :

  1. The registration region on cn server only can used on api-cn , same as region on US.
  2. The api-us method maybe was different with api-cn , for example : facepp.py line 351 showing the detect method was in /detection/detect but us document showing the method in https://api-us.faceplusplus.com/facepp/v3/detect (without detection)

so , when I make sure I have same region of registration and api-server , change methods on _APIS in facepp.py and I don't get any error message.

@michaelobr
Copy link

Has anybody found a fix for this issue? I am trying to use the web API in a ruby program I am making but keeping getting error 404.

@FMCumhaill
Copy link

@liumusicforever can you please provide:

  1. How you found which region your API was set to.
  2. The exact changes made to the facepp.py file.

I've played around with your suggestions, but I don't quite understand them

@liumusicforever
Copy link

@FMCumhaill Hi,

  1. You can check your sign up web page was https://www.faceplusplus.com.cn/(Chinese) or https://www.faceplusplus.com/(English) , and make sure your 'facepp.py' line 133 server same as the url.

  2. I just follow the document : change facepp.py line 351 /detection/detect to facepp/v3/detect , same as other APIs.

@FMCumhaill
Copy link

Hi @liumusicforever

Thanks for the support, I did as you suggested but if I set the url to https://www.faceplusplus.com/ it just returns a bunch of HTML code. If I set it to https://api.faceplusplus.com/ it returns {"error":"API not found}

Is this expected?

@joseph-sch
Copy link

  1. The API server address that works for me (from an AWS instance in the US) is: https://api-us.faceplusplus.com
  2. I've found that generating the HTTP request with the requests package is straightforward and therefore probably easier than using the API SDK: see a minimal example at https://gist.github.com/joseph-bs/a936d1f62926b2f44aa8ae27dfd0c7eb

@ckorgial
Copy link

Hello, everyone !

Does anybody know how it works in Europe?

Which API server to use? I am getting errors..

Any Help?

Thank you :)

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

10 participants