[#432] Failed tp get the token using method getToken

Migrated from Redmine #432 | Author: Ahmed Ali
Status: Closed | Priority: High, I’m very impatient | Created: 2019-10-09


I am trying to get the token by using the example at the API explorer
POST /login HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 128
Accept: application/json

{“jsonrpc”:“2.0”,“method”:“getToken”,“params”:[“mib”,“f43618e37b82004066d60db3431f4a06392599a6cfcafa8268bf25becc0ec7d7”],“id”:1}

and get below response

301 Moved Permanently

301 Moved Permanently


nginx

Redmine Admin wrote:

Please provide full raw http request to see what is wrong.
It is working fine here API documentation | SimplyBook.me Online Scheduling

Ahmed Ali wrote:

ok, now i am trying to call the api using the postman application
1- choose post
2- write the url
3- add the header keys
4- put the jason code in the body
5- press send

and get below error

Could not get any response
There was an error connecting to .
Why this might have happened:
The server couldn’t send a response:
Ensure that the backend is working properly
Self-signed SSL certificates are being blocked:
Fix this by turning off ‘SSL certificate verification’ in Settings > General
Proxy configured incorrectly
Ensure that proxy is configured correctly in Settings > Proxy
Request timeout:
Change request timeout in Settings > General

Please refer to attachemnts to check the header and body details

Redmine Admin wrote:

Hi, unfortunately it is not simple to use postman for json-rpc API. Please use some server based script on your favorite language

Ahmed Ali wrote:

can you provide a tool like postman that i can test calling your APIs

Redmine Admin wrote:

It also looks you are trying to access API endpoint by HTTP not HTTPS protocol

Ahmed Ali wrote:

For Https protocol requires authentication or certificate

Redmine Admin wrote:

Our API explorer working with https without any problem. Please use it as debug tool: you can put your company login and your API key into it and check all requests and responses

Ahmed Ali wrote:

This is not logic to test your own API by your own tool
we need to make sure your APIs are working from other application
otherwise please provide an example of consuming your API by C# language

Redmine Admin wrote:

Please provide us your RAW HTTP request if you think something is wrong with API

Ahmed Ali wrote:

Hello
Now i am able to call the API from Postman
but when i am trying to call the API from oracle database using http request it gives an error
ORA-29273: HTTP request failed
ORA-06512: at “SYS.UTL_HTTP”, line 1130
ORA-29024: Certificate validation failure

this error is showing because Oracle requires a certificate when using https protocol to be provided from the API owner to validate the request

please provide a certificate that can be used to fix this error

Redmine Admin wrote:

Hi, unfortunately we can’t you provide support with Oracle. Please contact their team with this question

Redmine Admin wrote:

Everything is fine with our certificate as you can see here SSL Server Test: user-api.simplybook.me (Powered by Qualys SSL Labs)