[#410] API Authetication Failure - 502 Bad Gateway

Migrated from Redmine #410 | Author: Viet Pham
Status: Closed | Priority: Immediate, there is BUG! | Created: 2019-08-16


POST https://user-api.simplybook.asia/login
Request Body:
{
“jsonrpc”:“2.0”,
“method”: “getUserToken”,
“params”: {
“companyLogin” : “truequit”,
"userLogin " : "userLogin ",
“userPassword”:“userPassword”
},
“id”:123455
}

Response:

502 Bad Gateway

502 Bad Gateway


nginx

I also double check for other approaches to get Token such as : getToken, getUserToken … was gotting the same issue…

Make sure that these API already worked before …

Thanks,
Viet Pham

Redmine Admin wrote:

Please follow procedures from API manual API documentation | SimplyBook.me Online Scheduling

access credential passed as headers, not as function params

Viet Pham wrote:

Redmine Admin wrote:

Please follow procedures from API manual API documentation | SimplyBook.me Online Scheduling

access credential passed as headers, not as function params

Viet Pham

Sure that X-Company-Login and X-User-Token also passed in headers request.
As i confirmed that the authencation already was used in production for a long time. Now getting issue.
Can help to doube check ?

Redmine Admin wrote:

It seems you are using wrong endpoint. it must be https://user-api.simplybook.me/login (do not use .asia domain) (why are you using it?)

Viet Pham wrote:

Redmine Admin wrote:

It seems you are using wrong endpoint. it must be https://user-api.simplybook.me/login (do not use .asia domain) (why are you using it?)

Oh yeah …
As I also see that API documentation | SimplyBook.me Online Scheduling it was documented to https://user-api.simplybook.asia/login

What is the difference betweend API documentation | SimplyBook.me Online Scheduling and API documentation | SimplyBook.me Online Scheduling?
Which best for using ?

Thank you

Redmine Admin wrote:

there is no difference in functionality. .asia is located in Singapore while your company is located in North America. There is no sense for you to use Singapore server.

Viet Pham wrote:

Redmine Admin wrote:

there is no difference in functionality. .asia is located in Singapore while your company is located in North America. There is no sense for you to use Singapore server.

To be confirmed, we will replace *.asian to *.me… Is it okay ?
Thank you.

Viet Pham wrote:

Viet Pham wrote:

Redmine Admin wrote:

there is no difference in functionality. .asia is located in Singapore while your company is located in North America. There is no sense for you to use Singapore server.

To be confirmed, we will replace .asia/ to .me/ /Is it okay ?
Thank you.

Redmine Admin wrote:

yes, you should replace it

Viet Pham wrote:

Thank you so much.

Since our service was being deployed on the cloud server (E2C) (AWS service) and now I have changed to .me/ what if the service belongs Singapore in further. Does it work any location ?

Redmine Admin wrote:

location of your company will not be changed automatically without notification or request. It was registered on .me server and will stay there.

Viet Pham wrote:

Redmine Admin wrote:

location of your company will not be changed automatically without notification or request. It was registered on .me server and will stay there.

Thank you so much.
I got now .. the issue was resolved.

Thank you for your support.