Why I can not generate token for reading data from things in smartwork IoT

Aditap Khongjun_21800
Aditap Khongjun_21800 Altair Community Member
edited January 2023 in Community Q&A

Now, I use Smartworks IoT to prove of concept that it can do for IoT project. I got some issue about generating token for allowing to access to the things. To send and read data to the things we need to generate token by using information from interface tab and have to specify the scope that want to access such as read, create, update, delete. when i generate token by using data.read on API inspector, i got issue that it not allow me to generate the token by display message "Fail to generate access token". but for scope to be "data.create" then it allow. please tell me why? and how to solve this issue

image

Answers

  • Paloma Reinoso Otero
    Paloma Reinoso Otero
    Altair Employee
    edited June 2022

    Hello Aditap,

    For security reasons, things just have permissions to send data (using the scope data.create) but not to read data. That's why if you want to read data from a thing you need to create an app as explained here  and add to it scope data. See below screenshots for reference:

    1. Create the app with scope data

     

    image

    2. Click + to add policy with resource #

    image

    3. image

  • Paloma Reinoso Otero
    Paloma Reinoso Otero
    Altair Employee
    edited January 2023

    Hello Aditap,

    For security reasons, things just have permissions to send data (using the scope data.create) but not to read data. That's why if you want to read data from a thing you need to create an app as explained here  and add to it scope data. See below screenshots for reference:

    1. Create the app with scope data

     

    image

    2. Click + to add policy with resource #

    image

    3. image

    NOTE: some changes have been made in the platform and the URL format for the API inspector doesn't required the https://api.swx.altairone.com anymore