Hello!
I'm having trouble making an Aruba Central API call. I want to make a call where I can add a device knowing its mac and its serial number.
I have two problems in the Aruba API (https://eu-apigw.central.arubanetworks.com/swagger/apps/nms/) there are two categories where I can make this call.
1.- The first is in 'New Device Inventory' --> Add device using Mac and Serial number. It is a POST call with the following URL: 'https://eu-apigw.central.arubanetworks.com/platform/device_inventory/v1/devices' and the error returned is the following:
{
"error_code": 500,
"msg": "Internal Error - Remote Service"
}
2.- On the other hand, we have another category in which to use this call which is 'Deprecated Device Inventory' --> Here I use the URL: 'https://eu-apigw.central.arubanetworks.com/device_inventory/v2 /devices' as indicated in the steps, but I get a different error:
{
"error": "CSRF token missing or incorrect.",
"status_code": 400
}
The problem is that I think the one that works well is number 2 (Deprecated Device Inventory). The thing is that I have followed the steps of the following documentation (https://developer.arubanetworks.com/aruba-central/docs/api-oauth-access-token) and I have obtained the CSRF Token, the session, the auth code and the final access token and the refresh token, but it still doesn't work for me and it always says: "CSRF token missing or incorrect.".
So, I don't know which of the two options I have to use and I don't know how to solve either of the two options. All calls are made from Postman and from my application. The problem is in these calls since I have tried to make calls such as creating a group and it works correctly both from Postman and from my app.
Thank you very much in advance everyone and I hope it can be solved!