Inconsistent splashAuthorizationStatus PUT behaviur

Cesar-A
Comes here often

Inconsistent splashAuthorizationStatus PUT behaviur

Hi!


I'm trying to expire a session using the Meraki API splashAuthorizationStatus, however nothing changes. I'm not sure if that problem it's related to this Locales are not supported because we're using a composed network

 

Actually I'm using the networkID that I got from the Deep Link because when I did the PUT using the netwok ID from https://api.meraki.com/api/v0/organizations/<organization>/networks I got the error that is mentioned on the ktzanet Post  {"errors":["Locales are not supported"]} and HTTP code 400.

 

This is my PUT body

 

https://n27.meraki.com/api/v0/networks/N_578149602163765230/clients/a4:71:74:45:f8:ec/splashAuthorizationStatus
{ "ssids": { "0": { "isAuthorized": false } } }

 

 

And this is the response from the API

 

 

{
    "ssids": {
        "0": {
            "isAuthorized": true,
            "authorizedAt": "2019-06-04 15:49:23 UTC",
            "expiresAt": "2019-06-05 15:49:23 UTC"
        }
    }
}

 

 

That doesn't make any sense, Am I doing something wrong?

 

5 REPLIES 5
BrechtSchamp
Kind of a big deal

This works for me:

2019-06-29 01_48_44-Postman.png

 

What tool are you using for it?

DexterLaBora
Meraki Employee
Meraki Employee

You have likely run into two known issues:

- the endpoint does not support combined networks.  (This is planned to be fixed)

- api.meraki.com/.. redirects to n27.meraki.com/...    this redirect will cause issues with PUT/POST operations, commonly with JS, as it does not follow the redirects properly or will drop the body along the way.   (this is planned to be fixed)

Temp Workarounds:

- use non-combined network

- hard-code your org's URL (i.e. n27.meraki...)

 

Hope this helps


@DexterLaBora wrote:

You have likely run into two known issues:

- the endpoint does not support combined networks.  (This is planned to be fixed)

- api.meraki.com/.. redirects to n27.meraki.com/...    this redirect will cause issues with PUT/POST operations, commonly with JS, as it does not follow the redirects properly or will drop the body along the way.   (this is planned to be fixed)

Temp Workarounds:

- use non-combined network

- hard-code your org's URL (i.e. n27.meraki...)

 

Hope this helps


Interesting... The network I tested this on is actually a combined network. Perhaps it's already fixed?

 

Based on what he wrote in the opening post, it seems to me he was already using the hardcoded links too.

You're right on both. 

- this endpoint now supports combined networks.

- the request was to the org's URL.

 

I tested without issues.

Screen Shot 2019-07-08 at 5.46.05 PM.png

 

Here is a cURL example, where I also added the -L flag to follow redirects (FYI)

curl -LX PUT \
  https://api.meraki.com/api/v0/networks/L_123456789000/clients/24:18:1d:ff:ff:ff/splashAuthorizationStatus \
  -H 'Content-Type: application/json' \
  -H 'X-Cisco-Meraki-API-Key: <API-KEY>' \
  -d '{
  "ssids": {
    "3": {
      "isAuthorized": true
    }
  }
}'
{"ssids":{"3":{"isAuthorized":true,"authorizedAt":"2019-07-08 15:52:16 UTC","expiresAt":"2019-07-08 16:22:16 UTC"}}}

 

It might be best to share a code view, or trace the http requests to see if something is missing. 

Im having the same problem, but only if the network is bound to a template. 

 

If the network is not bound to a template - it works.

 

Do you know this ment to be like this? i reckon this should work either way no? 

Get notified when there are additional replies to this discussion.