I there, I am working on some automation of various configurations within incontrol2. I am running into a issue when editing captive portals.
When performing a PUT or DELETE request to https://api6.ic.peplink.com/rest/o/{{oid}}/n/{{nid}}/cp/{cpid} or a POST request to https://api6.ic.peplink.com/rest/o/{{oid}}/n/{{nid}}/cp. The following error is returned:
401
{
"error": "unauthorized",
"error_description": "Access denied for this resource, oauth access is denied"
}
The request is send with a authentication header containing a bearer token. With the same authentication various other resources can be accessed. For instance https://api6.ic.peplink.com/rest/o/{{oid}}/n/{{nid}}/outbound_policy works fine.
Is anyone else running into similar issues, or can someone at Peplink tell me more about this error and how I can provide the correct authentication.
Mind you that I am running this as an automation workflow, creating captive portals via the incontrol dashboard works as expected. But that is not the goal here, the goal is to automation various manual tasks in preparation of a bigger rollout of hardware.