Skip to content

access_token

robert-valueguard edited this page Feb 4, 2026 · 11 revisions

Access Token

Generate access_token

Note that the token will be stored inside the client here

import valueguard

vgClient = valueguard.Client()
vgClient.server_url="https://api-prod.valueguard.se"
vgClient.authenticate("<username>", "<password>")

To print the access_token and refresh_token

print(vgClient.access_token)
print(vgClient.refresh_token)

The access_token will only be valid for about 1,5h. To refresh the validation time use the refresh_token

Raw request:

POST

https://api.valueguard.se/oauth/token?client_id=api&grant_type=password&username={USERNAME}&password={PASSWORD}

Curl

curl --location --request POST 'https://api.valueguard.se/oauth/token?client_id=api&grant_type=password&username={USERNAME}&password={PASSWORD}'

Clone this wiki locally