Get Access Token

Describes how to fetch token

To obtain the Access Token for authentication with the Zirius Pluss API, you will use the below mentioned endpoint. This endpoint requires you to use Basic authorization . Use Client Id as username and Client Secret as a password .Upon successful authentication, the endpoint will provide you with Access Token in the response.

Endpoint Details:

Get Access Token

POST /https://accounts.ecid.no/realms/zirius/protocol/openid-connect/tokenarrow-up-right

<This endpoint will return the access token and info about token expiry from Zirius+ Auth server>

Headers

Name
Value

Content-Type

application/x-www-form-urlencoding

Authorization

Basic <Base64(client_id:client_secret )>

Body - use x-www-form-urlencoding

Key
Value
Description

grant_type

client_credentials

It describes the OAuth2 flow type

Response

{
    "access_token": "ekjndsjfgjfgjdn9IVEY0Z3FHNVlcL3ZSTWtvdXhWaVdTRlVJNmxkd1U3c0JmND0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1OG5mN2RqYzFlbGUxMHN0Mjdqb2dtY2E4bCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiY29tLm0ybVwvcmVhZCIsIsdfasdfmF1dGhfdGltZSI6MTc2MzExNDgxNiwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLmV1LW5vcnRoLTEuYW1hem9uYXdzLmNvbVwvZXUtbm9ydGgtMV9kYnZwVWFyczkiLCJleHAiOjE3NjMxMTg0MTYsImlhdCI6MTc2MzExNDgxNiwidmVyc2lvbiI6MiwianRpIjoiNWUyNjU5MWQtZmZkNy00NzhkLTkwNjQtMTU4YWI5NjhhNWM0IiwiY2xpZW50X2lkIjoiNThuZjdkamMxZWxlMTBzdDI3am9nbWNhOGwifQ.AT2QBYA3FOnlZAEYxQliL-cPqDe-T0uTLDe2nsZoeG7jBOmWdYNUJ_f6hWzDhjDL0hXxI6e_CO1515IF3R86BrCDkBw8NUxbkoKAhQYAB9rjHh6inGi-584hRiqJW4ebGnNdrZGMQ6uEdPLjvEhy5rLryeKfT8EsnyyHDZdmSpgg4Zp2H4d9qCsXJZDCF5v47SqkZ0du21j3yl98dQAnqEc5ySXLl_Ny0vzrjyQPIzmdY3OEQQ3fvXqhh0bBajgDPXx_6Lrbn3kG9uz1yMkH-vc_MG36oVGIaHRWiFZ7maRICYX6fPppz-srjnewXaVVasffBldkUMpkMVJmfRYEtfC0A",
    "expires_in": 3600,
    "token_type": "Bearer"
}

Usage:

Once you have obtained the Access Token, you can use the Access Token as the authorization key in the headers of your API requests to authenticate with the Zirius API. If the Access Token expires, you can use Client Id & Client Secret for getting new Access Token.

By following these steps, you can securely obtain the necessary tokens for authenticating with the Zirius API and accessing its endpoints.

Last updated