Authentication

Default headers which should be included in the API request.

Request are authenticated using Bearer tokens. We provide a token for the requests, these tokens are used in API Calls , developers should also use http status to know the result of an API call .

Authorization headers should be in the following format: Authorization: Bearer token . Pass your secret key as a bearer token in the request header to authorize all requests.

Authenticate against the Identity provider

Authentication with Curl

curl --location --request POST 'https://idp-test.fsdhgroup.com/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=test-client' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_secret=secret'// Some code

Authentication with Postman

Using postman to retrieve access token

Authentication with Powershell - Rest method

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/x-www-form-urlencoded")

$body = "client_id=test-client&grant_type=client_credentials&client_secret=secret"

$response = Invoke-RestMethod 'https://idp-test.fsdhgroup.com/connect/token' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

API Authorization

All API calls on FSDH are authenticated. API requests made without authorization will fail with the status code 401: Unauthorized.

Your secret key can perform any transactions on your FSDH account without restriction.

To authorize API calls from your server, pass your secret key as a bearer token. This means passing an Authorization header with a value of "Bearer: YOUR_SECRET_KEY".

Last updated