error 400 api

error 400 api

error 400 api
error 400 api
2024-07-30 09:50:09 - last edited 2024-07-30 09:51:47

Hi,

 

I am trying to pull data from the API and have only managed to get the access token so far. However, any further requests end up with a bad request status 400 despite following every step of the documentation.

 

Here is the curl command I am using:

 

curl "https://{url}/openapi/v1/{omadacId}/sites" -H 'content-type:application/json' -H 'Authorization:AccessToken={token}' -X GET -i

 

No issue from the {} variables, as I got the access token using the same ones.

 

response :

 

{"timestamp":1722332116590,"status":400,"error":"Bad Request","path":"/openapi/v1/{omadacId}/sites"}

 

Do you have any hints or suggestions on what might be going wrong?

Thank you.

  0      
  0      
#1
Options
1 Reply
Re:error 400 api
2024-07-31 07:48:12 - last edited 2024-07-31 08:21:24

  @jngu 

Could you tell me how you utilize the API? Do you use a tool?I compared the curl command you used. Here's the difference.

The Curl Command in the document:  (this is an example of the curl command of the get site list interface)

curl "https://{url}/openapi/v1/{omadacId}/sites?pageSize=1&page=1" -H 'content-type:application/json' -H 'Authorization:AccessToken=AT-RCio7FS9p46wSD7dM8CwNQA7ylcrmAcV' -X GET -i -k --insecure             
The Curl command you use:

curl "https://{url}/openapi/v1/{omadacId}/sites" -H 'content-type:application/json' -H 'Authorization:AccessToken={token}' -X GET -i

Please read the API documentary carefully.

Best Regards! >> Omada EAP Firmware Trial Available Here << >> Get the Latest Omada SDN Controller Releases Here << *Try filtering posts on each forum by Label of [Early Access]*
  0  
  0  
#2
Options