0

I am trying explore on Azure IOT Central rest apis. IOT Central REST Ref

But when i try to invoke any api, it throws below error,

{
  "error": {
    "code": "InvalidRequest",
    "message": "This API cannot be called for the application seciotcentral.azureiotcentral.com. If you contact support, please include the following information. Request ID: 8yb2u4iz, Time: Mon, 24 Feb 2020 12:53:21 GMT.",
    "requestId": "8yb2u4iz",
    "time": "Mon, 24 Feb 2020 12:53:21 GMT"
   }
}

API

I tried with different API endpoint, but am getting same error, 'https://seciotcentral.azureiotcentral.com/api/preview/devices'

I created API token from administrator page in IOT Central, It is not authorization related issue since i got 400 bad request error.

Please help me to fix it.

Raj
  • 735
  • 1
  • 7
  • 24

1 Answers1

1

It looks like your IoTC App has been a legacy application, see the following screen snippet, where rk2018iotcentral is a legacy app. enter image description here

when I called your demoiotcentral application, the Unauthenticated error showup:

enter image description here

Did you recently changed it?

Roman Kiss
  • 7,925
  • 1
  • 8
  • 21
  • Hi, It is not demoiotcentral, name was wrong, it is seciotsectral. I just edited. Please check. – Raj Feb 24 '20 at 18:26
  • you mean to say IOT central application i created is old one which does nto support API? will it work if i create new IOT central application and try? – Raj Feb 24 '20 at 18:27
  • Is your *seciotcentral* application allows to use a Plug and Play device templates? The REST APIs will work only for that IoTC applications, in other words, they can not be created from *Application template = Custom application (legacy)* – Roman Kiss Feb 24 '20 at 19:56