system
1
Migrated from Redmine #476 | Author: Maram M
Status: Closed | Priority: High, I’m very impatient | Created: 2020-02-17
I’m using this method addServiceProvider,
And I’m receiving an error response
{“id”=>“SVS”,
“error”=>{“code”=>-32000, “data”=>nil, “message”=>“Unexpected error”},
“jsonrpc”=>“2.0”}
And from where the id has been SVS?
system
2
Maram M wrote:
and I didn’t find the ServiceProvider in the simplybook.me
system
3
Redmine Admin wrote:
please provide your RAW HTTP request
system
4
Maram M wrote:
Redmine Admin wrote:
please provide your RAW HTTP request
I think, we use this URL: https://user-api.simplybook.me/login
system
5
Maram M wrote:
response = HTTParty.post(
“https://user-api.simplybook.me/admin”,
body: {
id: “SVS”,
jsonrpc: “2.0”,
method: method_name,
params: [*body]
}.to_json,
headers: user_headers
)
system
6
Maram M wrote:
POST /login HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 135
Accept: application/json
system
7
Redmine Admin wrote:
this is not raw http request
system
8
Maram M wrote:
where can I find it? is there a specific way?
system
10
Redmine Admin wrote:
POST HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 60
X-Company-Login: mib
X-Token: bb37c4fdd32e3cea7c564ad8acfaf6cc50ff545d3bf8960659bc2b0197fd7e71
Accept: application/json
{"jsonrpc":"2.0","method":"getEventList","params":[],"id":1}
here is example of raw http request we need
ypu can check it in our API explorer HTTP Request tab API documentation | SimplyBook.me Online Scheduling
system
11
Maram M wrote:
POST HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 60
X-Company-Login: Takamolsvp
X-Token: 04214468f9e7976c5111f2bb1f6bbb5131d0a931dd115f871c257928d01547d0
Accept: application/json
This is our RAW HTTP request
{“jsonrpc”:“2.0”,“method”:“getEventList”,“params”:,“id”:1}
system
12
Maram M wrote:
POST HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 60
X-Company-Login: Takamolsvp
X-Token: 04214468f9e7976c5111f2bb1f6bbb5131d0a931dd115f871c257928d01547d0
Accept: application/json
{“jsonrpc”:“2.0”,“method”:“getEventList”,“params”:,“id”:1}
system
13
Redmine Admin wrote:
company login must be takamolsvp
system
15
Redmine Admin wrote:
it should not starts from capital letter in code
system
16
Maram M wrote:
It isn’t starting with capital latter
system
17
Redmine Admin wrote:
What is request urL? it must be ‘url’: ‘//user-api.simplybook.me’,
system
18
Redmine Admin wrote:
please simply insert you company login and API token int API explorer and follow it