Closed HungUnicorn closed 6 years ago
Hello.
Nevertheless, I found TOKEN is hard-coded in the test.
Not only the token is hard-coded, but the google responses too, see here. Those tests are unit tests, so their job is to test code, not detect api changes.
In our code we reset TOKEN for each hour. Would it be necessary?
I would suggest checking for 401 responses to api requests. 401 means the token is stale, so it is time to get a new one. Token lifetime is not long - hours at best.
if you don't get new TOKEN, the old TOKEN will not be expire.
@HxBreak It will. Later.
@yeriomin i have a spider the token worked for a long time.
@HxBreak It might depend on the device. Two-step token retrieval does not work for them for example.
Hi,
I know GSFID will not expire, because it's used for two years and never changed in our code. Nevertheless, I found TOKEN is hard-coded in the test. https://github.com/yeriomin/play-store-api/blob/master/src/test/java/com/github/yeriomin/playstoreapi/GooglePlayAPITest.java#L16
In our code we reset TOKEN for each hour. Would it be necessary?