Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 2.43 KB

File metadata and controls

43 lines (29 loc) · 2.43 KB

Environments – Notify Supplier

Environment Matrix

Environment Name Apigee Instance Proxy URL Application Security Level Private Key KID Notes / Env Code
Internal dev – PRs Internal internal-dev.api.service.nhs.uk/nhs-notify-supplier-PR-XXX Notify-Supplier-App-Restricted – Internal Dev 2 level 0 internal-dev PRs
Internal dev – Main Internal internal-dev.api.service.nhs.uk/nhs-notify-supplier Notify Supplier – Application Restricted – Internal Dev Main level 3 internal-dev-test-1.pem internal-dev-test-1 dev
Ref Internal ref.api.service.nhs.uk/nhs-notify-supplier Notify Supplier – Application Restricted – Ref level 3 ref-test-1.pem ref-test-1 prod
Int External int.api.service.nhs.uk/nhs-notify-supplier Notify Supplier – Integration Testing level 3 int-test-1.pem int-test-1 int

How to Get the JWT Access Token

  1. Download the private key from AWS Systems Manager and save it locally as $KID.pem, for example ref-test-1.pem.

  2. Get the Apigee API key via one of the following:

  3. Run the Python script get_bearer_token.py with the parameters:

    python get_bearer_token.py --kid <KID> --env <ENVIRONMENT> --appid <APIKEY>

    Example:

    python get_bearer_token.py --kid ref-test-1 --env ref --appid 8Np3gFEw21JX7AGuokId0QEFTaOhG4Z2
  4. The access token will be returned in the response

  5. Add the access token to your API requests as a header:

    Header Name Header Value
    Authorization Bearer <access token>