LogoLogo
TPI.devCommunityGithub
  • Overview
    • Introduction
      • Future Features
    • License & Disclaimer
    • APIM Architecture
      • Production Deployments and Capacity
      • Functions
      • Integration
    • Key Concepts
      • API Group
      • API Scope
      • API Client
      • End-to-End Workflow Combining API Group, API Scope, and API Client
        • Scenario: API Management for an E-commerce Platform
    • Support
    • Glossary
    • Scenarios
      • Financial Industry
        • Transforming Financial Services with digiRunner API Management
        • Redefining Financial Data Migration with digiRunner API Management Platform
      • Manufacturing Industry
        • Enabling Smart Manufacturing with Seamless API Integration and Automation via digiRunner
        • Streamlining Global Operations with API Management via digiRunner
      • Medical Industry
        • Enhancing Healthcare Data Integration and Security with digiRunner API Management
        • Revolutionizing Healthcare Interoperability with digiRunner’s Advanced API Framework
      • Insurance Industry
        • Modernizing Insurance Services with digiRunner API Management
        • Modernizing Insurance with digiRunner—Bridging Legacy Systems and Microservices
      • Government and Public Services
        • Empowering Open Government Services with digiRunner: A Mission for Integration and Transformation
        • Streamlining Public Sector Innovation via digiRunner: Driving Citizen-Centric Digital Transformation
  • Get Started
    • Installing digiRunner API Management
      • SMTP Configuration
    • Registering Your First APIs with digiRunner
    • Client Authorization and Calling APIs
    • Rate Limiting
    • Proxy Caching
    • Load Balancing
    • Sandbox Testing
    • VIP Gateway Priority Settings
    • JWE Certificate
  • Configuring IP Whitelisting via IP Binding
  • Most common use cases
    • Obtaining API Keys and Calling APIs
    • API IP Diversion
    • Viewing Real-time API Logs
    • Enabling APIs and No Auth in Batches with API Imported
    • Role-Based Access Management within a Hierarchical Structure
    • Simplified OIDC Login with Predefined Organizational Frameworks
    • Resetting User Password and Confirmation Email for Admin Console User
  • Guide
    • AC User Management
      • Users
      • My Profile
      • Roles
      • Role Mapping
      • Organization
      • Role & txID
      • Delegate AC User
      • AC OAuth 2.0 IdP
      • AC LDAP IdP
      • AC MLDAP IdP
      • AC API IdP
    • Development Mode
      • Function Management
      • Rtn Code Management
      • Embedded Function Management
    • Client Management
      • API Client
      • API Group
      • API Scope
      • Authentications
      • Security Level
      • GTW OAuth 2.0 IdP
      • GTW LDAP IdP
      • GTW API IdP
      • GTW JDBC IdP
      • Client Export/Import
    • API Management
      • API List
      • API Registry
      • API Test
      • API Modify Batch
    • Monitor & Alert
      • digiRunner Server
      • Alert Settings
    • Reports
      • API Calls
      • API RESP distribution
      • API Avg. RESP Time
      • API GTW traffic
      • Bad Attempt Report
    • Certificate Management
      • JWE Cert. List
      • JWE Cert. Management
      • TLS Cert. List
      • TLS Cert. Management
    • Application Forms
      • API Key
      • Applications
      • Approval Flow Settings
    • System Information
      • API Key Approval History
      • Scheduled Tasks
      • Recurring Tasks
      • Mail Log
    • System Configs
      • Setting
      • Items
      • Files
      • Customer Setting
      • Online Console
      • WebSocket Proxy Management
      • Static Webpage Reverse Proxy
      • RDB Connection
      • Mail Template Export/Import
  • API Integration Guide
    • Using Token for Authentication and Authorization
      • OpenID Connect (OIDC) Mode
      • Client Credentials Mode
      • Password Mode
    • Using X API Key for Authentication and Authorization
      • Applying for X API Key
      • Obtaining X API Key
      • Calling APIs Registered in digiRunner with X API Key
    • Using API Key for Authentication and Authorization
      • Applying for API Key
      • Obtaining API Key and Secret Key
      • Calculating the Signature and DGRK
      • Calling APIs Registered in digiRunner with API Key
    • Using HTTP Basic and OAuth for Authentication and Authorization
      • Calling APIs Registered in digiRunner with Basic Auth
      • Calling APIs Registered in digiRunner with No OAuth
    • Token Lifecycle Management Mechanism
      • Applying Refresh Token
      • Token Revocation
      • Token Introspection
    • JWS/JWE Integration
      • JWS Workflow
      • JWE Workflow
      • Exchanging Public Keys
      • Generating Certificate
      • Operating with JWS
      • Operating with JWE
Powered by GitBook
On this page
  • Workflow
  • Example of Successful Response
  • Example of Error Response
  • Calling APIs Registered in digiRunner with Access Token

Was this helpful?

Export as PDF
  1. API Integration Guide
  2. Using Token for Authentication and Authorization

Password Mode

PreviousClient Credentials ModeNextUsing X API Key for Authentication and Authorization

Was this helpful?

Workflow

Example request:

curl -v -X POST 'https://{digiRunner_DOMAIN}/oauth/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic {client_secret}' \
-d 'grant_type=password' \
-d 'username={username}' \
-d 'password={user_secret}'

Parameters with details:

Parameter
Type
Requirement
Description

client_secret

String

Required

1. Client Password registered with digiRunner; needs to be encoded with Base64

2. Concatenate the client ID with ":" and the encoded client password, then encode the result with Base64 again to generate the value to be used

3. Example:

Client ID: tspclient

Client Password: tsp123abcd

Formula for generating the value:

Base64 Encode(ClientID+":"+Base64 Encode(Client Password))

Base64 Encode(tspclient+":"+Base64 Encode(tsp123abcd))

Base64 Encode(tspclient:dHNwMTIzYWJjZA==)

Output for client_secret:

dHNwY2xpZW50OmRITndNVEl6WVdKalpBPT0=

grant_type

String

Required

password, a fixed value

username

String

Required

User account applied with digiRunner

user_secret

String

Required

User password applied with digiRunner, which needs to be Base64 encoded (e.g., if the password is "user123abcd," after encoding, it will be "dXNlcjEyM2FiY2Q="). Use the encoded value as the Value.

Example

User Password: user123abcd

Formula for generating the value of user_secret:

Base64Encode(User Password))

Output for user_secret:

dXNlcjEyMw==

Example of Successful Response

Example:

{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJub2RlIjoiZXhlY3V0b3IxIiwiYXVkIjpbIllXUnRhVzVCVUVrIl0sInVzZXJfbmFtZSI6InRzcHVzZXIiLCJvcmdfaWQiOiIxMDAwMDAiLCJzY29wZSI6WyIyMDAwMDAwMDA2Il0sInN0aW...",
"expires_in": 86399,
"jti": "3a26a644-4fb4-45bc-83a7-a0f583643bf0",
"node": "executor1",
"org_id": "100000",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJub2RlIjoiZXhlY3V0b3IxIiwiYXVkIjpbIllXUnRhVzVCVUVrIl0sInVzZXJfbmFtZSI6InRzcHVzZXIiLCJvcmdfaWQiOiIxMDAwMDAiLCJzY29wZSI6WyIyMDAwMDAwMDA2Il0sImF0aS...",
"scope": "2000000006",
"stime": 1684833178931,
"token_type": "bearer"
}

Example of Error Response

If the user password is incorrect, a 401 Unauthorized HTTP status code and JSON response will be returned.

Example:

{
"error": "invalid_grant",
"error_description": "Bad credentials"
}

Calling APIs Registered in digiRunner with Access Token

After obtaining the access token issued by digiRunner, TSP can utilize the associated permissions to call APIs registered in digiRunner.

For the request example and parameter with details, refer to OpenID Connect (OIDC) Mode > .

Calling APIs Registered in digiRunner with Access Token