If the method succeeds, the return value is the length of the
bearer token string. A return value of zero indicates that no bearer
token has been specified. If the method fails, the return value is
HTTP_ERROR. To get extended error information, call GetLastError.
This method returns the bearer token which was previously set by
a call to SetBearerToken. Bearer tokens can be
very long strings and do not contain any human readable information.
For Google services, these tokens are usually about 180 characters in
length. For Microsoft services, their bearer tokens are typically
1,200 characters in length. It is recommended that you provide a
buffer size of at least 2,000 characters.
Your application should not store the bearer tokens provided by a
web service. These tokens are short-lived and typically only valid
for about an hour. If the token has expired, the authorization to
access the resource will fail and it must be refreshed. The
refresh tokens used to acquire a new bearer token should be stored and
they are typically valid for a period of months.