Basic Open API question(s)
I am trying to use OpenAPI for the first time and run into a block -- I have created an openAPI client-mode application.
First question: after creating it is there something I have to do to activate it (because, as you'll see in a minute, it is acting as if the applciation/cleint id dosn't exist)
I call /api/info and get a response with an omadicid
I then call {OMADA_HOST}/openapi/authorize/token?grant_type=client_credentials and I get a respnse that includes an access token, extracted below:
access token= AT-OiOguST7Ts6b4IIzuC5kPsVt49FpcfBP
Next I want to find a site id so I post to https://192.168.8.253/openapi/v2/sites with these headers and payload:
get_site_id headers: {'Authorization': 'Bearer AT-OiOguST7Ts6b4IIzuC5kPsVt49FpcfBP', 'Content-Type': 'application/json'}
get_site_id payload: {'omadacId': '748f2b5423aa3530b82f9312ad9535cc'}
And I get the following respoponse:
get_site_id status code: 200
get_site_id raw text: {"msg":"Controller ID not exist.","errorCode":-7131}
Any hint what stupid new user mistake I am making??
Thanks for any help!