Μετάβαση στο περιεχόμενο

Getting started

Από credentials σε working call: περίπου 10 λεπτά.

Τι θα λάβεις από εμάς

Δύο στοιχεία για το service account:

Στοιχείο Παράδειγμα Σε τι χρειάζεται
Client ID acme-consumer Ταυτοποιεί το integration σας
Client Secret xK9...random Εκδίδει access tokens

Production credentials

Μην τα κάνετε commit. Βάλτε τα σε secret manager ή έστω σε env variables.

Σημαντικά endpoints

Service URL
API base https://api.insurancegateway.gr
Keycloak https://auth.insurancegateway.gr
Realm estia
Token endpoint https://auth.insurancegateway.gr/realms/estia/protocol/openid-connect/token
Health check https://api.insurancegateway.gr/health/ready

First call

1. Πάρτε access token

curl -X POST "https://auth.insurancegateway.gr/realms/estia/protocol/openid-connect/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=<your-client-id>" \
  -d "client_secret=<your-client-secret>"

Response:

{
  "access_token": "eyJhbGciOiJSUzI1NiIs...",
  "expires_in": 3600,
  "token_type": "Bearer"
}

2. Καλέστε ένα endpoint

TOKEN="eyJhbGciOiJSUzI1NiIs..."

curl -X GET "https://api.insurancegateway.gr/intersalonica/auto/brands" \
  -H "Authorization: Bearer $TOKEN"

3. Health check (χωρίς auth)

curl https://api.insurancegateway.gr/health/ready
# -> 200 OK, "Healthy"

Next steps

Cache το token

Μη ζητάτε νέο token σε κάθε call. Cache it, refresh λίγο πριν λήξει.