[−][src]Function fxaclient_ffi::fxa_get_access_token
#[no_mangle]pub extern "C" fn fxa_get_access_token(
handle: u64,
scope: FfiStr<'_>,
ttl: u64,
error: &mut ExternError
) -> ByteBuffer
Try to get an access token.
If the system can't find a suitable token but has a refresh token
or a session_token
,
it will generate a new one on the go.
If not, the caller must start an OAuth flow with [fxa_begin_oauth_flow].
Arguments:
- scope: space-separated list of scopes that the token should have
- ttl: the time in seconds for which the token should be valid (or zero to use the server-controlled default ttl)
Safety
A destructor [fxa_bytebuffer_free] is provided for releasing the memory for this pointer type.