Token usage in Rest Request

using Rest API to get csv data from 3 stations I have operating. Each station has it’s on account. I’ve generated tokens for each station. Only one station return data. All other return a 404. Only difference is in the token value. Shouldn’t the access token allow for 3rd parties to access these stations using the station access key?

Assuming you own all three stations (i.e. you can log into their accounts), and you generate a separate access token for each station (i.e. one on each account), you should be able to access the data from each of the three stations. What you can’t do is use a token from one station on another station.

Can you post the output of the failing API requests?

It’s a straight up 404, page not found error. Works fine on one device and works on all using the developer api key. Would seem to be PAC issue. I did log into all three accounts and generate a PAC for each device

Is this what you are seeing:

{"status":{"status_code":404,"status_message":"NOT FOUND"}}

yes. That’s what is returned

OK, the only way I can generate that response is to use the incorrect access token for a particular Station/Device ID. This might be obvious, but can you double check that the token used in each API requests comes from the same account as the Station/Device ID in that request.

That was approach I took. Each PAC is the one generated for the station/device being accessed. It’s almost definitely the codes as it works fine with one of them. This shouldn’t have issues with the machine it’s being run on as it would eliminate the validity of using the PAC in the first place.

OK, in which case I think we need help from higher up. @dsj or @corrineb should be able to help out with this.

I think I have the issue. When logging to the other accounts there is no station or device. Not sure how this came to pass but that would do it.

The [rglohman@xxxx(mailto:rglohman@xxxx) account should have station # 22520 and the tempest device #: 74663 (Ruthln)

The other station should be under

cameroncreer@xxxx with station # 27796 and device # : 89313 (VastoSt)

pretty sure I screwed it up somehow!

Not sure if this was a user fat finger when installing the stations

How can I fix this, preferably the easy way!

Scott

edit : took out part of the mail accounts to prevents robots from spamming you dead

Peter:

I confirmed that the issue is only with the device 74663. This is the same device that just dropped off line one day and had to go over and cycle power to the device to get it back on line. It seems there is still issues from that as nothing shows when you log into the rglohman@xxxx account.

The other station I referenced, at device 89313 is working fine with the PAC.

Thanks

Scott Lohman

This station is online and I can see it’s webpage but there is no token associated with it right now

all numbers are ok,

as said first one has no token associated with it
second is having a token and should be working

1 Like

Doh! I was reading hub numbers. All the Tempest IDs are definitely correct as @eric said

I think we figured it out. Station with station_id of 22520 is currently attached to an account with username rglohmab@roadrunner.com (note the “b” instead of “n”). Must have been a typo when you created it. We’ll move that station over to the correct account in a minute. Stand by!

2 Likes

You should be all set, @scott3

PS: If you’d like to merge these three stations into a single account, we can do that too.

1 Like