Use personal access tokens as a safe alternative to authenticating with username and password.
Personal access tokens are as important as passwords and should be equally protected.
Supported APIs : Catalog Provider API, Download API and STAC API (see below)
Permissions
Permission level of personal access tokens is set to the level of access you currently have.
Manage your tokens
Create a token
- Login with the desired account
- Open My account
- Under Security click Manage access tokens
- Click Create a token at the top right
- Give the token a name and choose its expiry policy
- Click create
- Copy the token value, as it will never be shown again
- Store the token string in a safe place, and click close
Revoke a token
- Login with the desired account
- Open My account
- Under Security click Manage access tokens
- Click the Revoke button on the desired token, and confirm
Use a Personal Access Token
Programmatically, in HTTP header
APIs use the Bearer scheme authentication, every HTTP request must include the token in Authorization header :
Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN_HERE
Example :
Authorization: Bearer ZMZJViYLfRqKh9y5FjTE32uRg5S4Xqr5oBVuC8EQaNiPpyC3VgQr1NbccWMbY8xG
With a STAC client (QGIS, ArcGIS Pro, pystac-client)
On the STAC API the token is optional: without it, only public data is listed; with it, the restricted data your account may download is listed too. Configure the token in your client before browsing: a restricted collection you may not access answers as if it did not exist, the client will not be asked for credentials.
- QGIS: create an authentication configuration of type API Header, with the header
Authorizationand the valueBearer YOUR_TOKEN, and select it in the STAC connection - ArcGIS Pro: in the STAC connection, add it under Custom headers (
Authorization/Bearer YOUR_TOKEN) - pystac-client:
Client.open(url, headers={"Authorization": "Bearer YOUR_TOKEN"})
Files (assets) are read from the provider's direct URLs, without token. As some clients may send these headers to the asset servers too, use a token dedicated to STAC, with an expiry date.
With FME, in a "Web Connection"
FME is a geospatial ETL software developed and maintained by Safe Software. To ease the use of these tokens in FME, you can configure them in a "Web Connection" that can be reused, updated in a single place, shared, or uploaded to FME Flow (formerly Server).1 : Import Viageo Web Service in FME
- Download the Viageo service descriptor file here : viageo_web_connection_for_fme.xml
- In FME, open : Tools > FME options... > Web Connections
- Click Manage Services...
- Click + at the bottom left (Add Web Service) and choose Import From File...
- Select the downloaded viageo_web_connection_for_fme.xml file, and click OK
- You can close the modal and are now ready to add a Web Connection
2 : Add a Web Connection
- In FME, open : Tools > FME options... > Web Connections
- Click + at the bottom left (Add Connection)
- Select Viageo in the Web Service drop-down
- Type a Connection Name
- Paste your Personal Access Token in the required field
- You are now ready to use the Web Connection
3 : Use the Web Connection
- In FME, add an HTTPCaller transformer
- Fill the Request URL, HTTP Method, Query String Parameters and Body depending on your use case
- Check Use Authentication
- Choose Web Connection for Authentication Method
- Choose the previously created Web Connection in the drop-down
- You are now ready to make API calls with a Personal Access Token in FME