To generate an access token that has the necessary permissions to invoke an API, you need to define the required scopes. You can generate the access token by defining all the device management scopes or you can generate the access token that only has the permission or scope to invoke the API you want.
In this tutorial, you get the scope details to invoke a specific API.
Let's get started!
- Navigate to the WSO2 API Cloud Store.
- Click on the tag you want. Tags are used to group the APIs that fall under similar categories. The APIs that are used to manage the devices are grouped under device_management, the APIs used by the WSO2 iOS agent is grouped under iOS and the APIs used by the Android agent are grouped under android.
For example, click the device_management tag.
- Click on the API segment you want to invoke.
For example, click Android Device Management.
- Click the API Console tab.
Click on the method you want to invoke to see the scope details. Define this scope when obtaining your access token.
NOTE: If you are generating the access token by using a scope that is specific for an API, you can only invoke that API using the access token.
For more information on generating the access token, see Obtaining the access token.
For example, click the GET device status, method.
Once you have identified the scope details, you can obtain the access token.