Authenticate

Description

All service requests to the Terminal API must be authorized using an authentication token. You retrieve these tokens by sending an OAuth2 client_credentials type grant request to the authentication endpoint for your terminal. You must include either a Basic Auth header or POST parameters within this grant request.

You will receive an ephemeral access token in the response that you will provide in the authorization header for additional API requests. Tokens are valid for 12 hours.

Endpoint

Staging

https://[domain]-auth-uat.beta.boldpenguin.com/auth/token?grant_type=client_credentials
  • NOTE: Replace [domain] with your unique domain provided during on-boarding.

Production

https://[domain]-auth.boldpenguin.com/auth/token?grant_type=client_credentials
  • NOTE: Replace [domain] with your unique domain provided during on-boarding.

Authentication

The authentication API requires a unique client_id and client_secret provided to you by your account manager for each environment. Authentication is carried out through HTTPS basic authentication (or POST parameters) and returns an access_token that will be used as a bearer token for all subsequent requests.

Methods

POST

Request Syntax

The request is an HTTPS POST with the client_id and client_secret provided via HTTP Basic Authentication credentials or POST parameters.

Request Parameters

Query String Parameters

The query string must include grant_type=client_credentials

Response Syntax

{
  "access_token": <string>,
  "token_type": "bearer",
  "expires_in": <integer>,
  "refresh_token": <string>,
  "scope": <empty string>,
  "uid": <string>,
  "info": {
    "name": <string>,
    "email": null,
    "first_name": <string>,
    "last_name": <string>
  }

Response Elements

Response Elements

  • access_token
    • The bearer token to provide for subsequent send side API requests
    • Type: String
  • token_type
    • Type: String
    • This will always be bearer
  • expires_in"
    • Expiration for this token is 12 hours set in seconds (43200)
    • Type: Integer
  • refresh_token
    • Refresh tokens are not currently enabled
    • Type: String
  • scope
    • Access scope for this token (currently an empty string)
  • uid
    • Unique ID for this token
    • Type: String
  • info
    • This will always reflect the service client ("Tenant Integrations Service Client")
    • Type: JSON

Status Codes

  • 200 Success
  • 401 Unauthorized (verify client credentials)
  • 500 Internal server error

Examples

Example Request

$ curl -u <client_id>:<client_secret> \
       -X POST \
       --header 'Content-Type: application/json' \
       https://boldpenguin-auth-uat.beta.boldpenguin.com/auth/token?grant_type=client_credentials

Example Response

{
  "access_token": "7UkvNeAabPduAvyvu4XEqSCC",
  "token_type": "bearer",
  "expires_in": 43200,
  "refresh_token": "wYwtq6NGie5paAR2XHK6uF1f",
  "scope": "",
  "uid": "f00718ea-3c64-45f1-99de-2ac34cea139a",
  "info": {
    "name": "Tenant Integrations Service Client",
    "email": null,
    "first_name": "Tenant Integrations",
    "last_name": "Service Client"
  },
  "extra": {
    "raw_info": {
      "user_id": "8de85azr-ec20-4f2c-b8b4-0ae3c067c73b",
      "tenant_id": "8823a91f-54f9-4866-aec7-67a5f1062be1",
      "tenant_name": "Chuck's Agency",
      "primary_user_group_id": "a621af94-f454-4ffc-b56c-08971630b622",
      "user_group_ids": [
        "a621af94-f454-4ffc-b56c-08971630b622"
      ],
      "name": "Tenant Integrations Service Client",
      "email": null,
      "first_name": "Tenant Integrations",
      "last_name": "Service Client",
      "permissions": [
        "Owner:8de85azr-ec20-4f2c-b8b4-0ae3c067c73b:tenants/lent_application_forms:create",
        "Owner:8de85azr-ec20-4f2c-b8b4-0ae3c067c73b:exchange_application_forms:create",
        "Owner:8de85azr-ec20-4f2c-b8b4-0ae3c067c73b:tenants/application_forms:create",
        "Tenant:8823a91f-54f9-4866-aec7-67a5f1062be1:tenants/application_forms/clones:create"
      ],
      "auth_uid": null,
      "completed_steps": []
    }
  }
}

results matching ""

    No results matching ""