Skip to content

Authentication

Bearer Token

Unless you are able to perform the OAuth2 authorization code flow directly, accessing the Lynker Spatial data service will require setting a Bearer token on all HTTP requests. This bearer token is retrievable from: https://proxy.lynker-spatial.com/token.

INFO

In this case, the bearer token is an OAuth2 ID token, not an access token.

This will return a bearer token, its expiration time, and your account email in JSON form.

hfutils

hfutils does not require retrieving the bearer token yourself. It provides a dedicated OAuth2 client that performs the Authorization Code Flow within an R session. Therefore, token management is automated when using hfutils to access Lynker Spatial resources. Additionally, you can manually pass this token like so:

r
token <- hfutils::lynker_spatial_auth()$id_token
tbl <- flowfabric_streamflow_query("nws_owp_nwm_analysis", feature_ids = c("101"), token = token)

This will perform the OAuth2 flow to provision a short-lived bearer token. You can call this function as often as needed. If called after your token is expired, it will refresh the token.

Usage limits

We provide a generouse (5 gig) usage limit on these services that refreshes monthly. To check how much you've used, navigate to https://flowfabric-api.lynker-spatial.com/v1/me.

Now that you know how to get authenticated, see how you access the data.