WuBook Community Forum
Return Values for is_token_valid - Printable Version

+- WuBook Community Forum (https://en.wubook.net/forum)
+-- Forum: WuBook Suite (/forumdisplay.php?fid=1)
+--- Forum: Support for the Booking Engine (/forumdisplay.php?fid=2)
+--- Thread: Return Values for is_token_valid (/showthread.php?tid=268)



Return Values for is_token_valid - TS016 - 08-17-2014 02:57 AM

Hi,

What are the values returned by the is_token_valid method in Wired return? Submitting a request with a valid token gives a response with a "Returncode" of zero (which says success), but the Info part of the response contains an integer (2). What does the value returned in Info mean?

Thanks in advance for your reply.


RE: Return Values for is_token_valid - yellow - 08-20-2014 07:37 PM

Hello,

sorry for the delay of the response.

The second value is the usage counter. As you can read on the docs, a token can be used for a lmiited number of calls. This can be useful to understand how many times a token has been used.

Notice that a correct implementation, which implies common sense, probably does not require the counter. If you open a token when you need to make operations and if you correctly compact your call, there will be no need to take care about token usage limits.

Let me know if I can help you fiurther!