Empeiria Documentation
  • Getting Started
    • Welcome to Empeiria
    • 5 minutes Quickstart
    • Tutorial: Credential Issuance & Verification
      • Overview
      • Understanding Key Concepts
      • Project Setup
      • Deploying the Issuer
      • Uploading the Credential Schema
      • Issuing Credentials
      • Frontend for Credential Issuance
      • Testing Credential Issuance
      • Deploying the Verifier
      • Setting Up the Verification Flow
      • Creating a Verification Endpoint
      • Creating a Protected Dashboard
      • Testing the Verification Flow
      • Summary & Next Steps
  • Understand
    • EVDI Architecture
    • Self-Sovereign Identity
      • Technical Foundations
      • Roles in the SSI framework
      • Protocols and Standards
  • Develop
    • One-click deployment
      • Introduction
      • Registration
      • Login
      • Creating an Issuer
      • Issuer Data Description
      • Creating a Verifier
      • Verifier Data Description
    • Issuer
      • Terminology and Concepts
      • DID Document Management
      • Schema Management
      • Issuing Credentials and Interacting With Wallets
      • Revocations
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • MCP Server Integration
      • FAQ
      • API Reference
        • Token
        • Schema
        • Offering
        • Metadata
        • Credential
        • Blockchain
        • Authorization
    • Verifier
      • Terminology and Concepts
      • Architecture Overview
      • Core Responsibilities
      • Query Language
      • Client Configuration
      • Frontend Integration
      • Revocations
      • Server-Side VP Queries
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • MCP Server Integration
      • FAQ
      • API Reference
        • VP Query
        • QR Code
        • Authorization
    • Wallet SDK (Coming soon)
    • Introduction to cosmwasm
  • Empe Blockchain
    • Overview
    • Chain Architecture
      • Auth
      • Authz
      • Bank
      • Distribution
      • Governance
      • Staking
      • IBC
      • DidDoc
      • Vesting
      • Minter
      • Stablefee
      • LinkedResources
    • Important links
    • Validators Guide
      • New validator
      • Hardware requirements
      • Required software installation
      • Go installation
      • Install prebuild binary
      • Install binary from source code (option B)
      • Configure a node
      • Cosmovisor setup
      • Install wasmvm
      • Sync with state-sync
      • Full state sync from archive snapshot
      • Latest snapshot
      • Run a Validator
      • Migration to v0.2.2
      • Migration to v0.3.0
      • Migration to v0.4.0
      • FAQ
  • User Guide
    • Empe DID Wallet
      • Intro
      • Download and first launch
      • Create or import did
      • Main screen overview
      • How to claim credential from issuer
      • How to use credential with verifier
      • Settings and other options
    • Keplr Wallet and Blockchain Operations
      • How to Connect Keplr Wallet
    • Ping Pub operation
    • Staking Tokens Guide
    • Voting on Governance Proposals Guide
    • Sending Tokens Guide
    • Airdrop
      • On-Chain Testnet Airdrop
      • Faucet Guide: How to Claim Testnet Tokens?
  • Appendix
    • Glossary
Powered by GitBook
On this page
  1. Develop
  2. Issuer
  3. API Reference

Token

PreviousAPI ReferenceNextSchema

Exchange authorization code for access token Validates the authorization code and creates a JWT access token for the holder

post

Creates a new access token using an authorization code

Body

Request containing the authorization code

authorization_codestringRequired

Authorization code received from the authorization request The code must be a non-empty string in format of [A-Za-z0-9-_] with length between 32 and 128 characters

Example: AF3DiOZy_x1jF9mKJqUwN5JDnpxk0GlwJMdfQOiAbc
Responses
201
Success
application/json
400
Bad Request - Invalid or missing authorization code
application/json
404
Not Found - Authorization request not found
application/json
500
Server Error
application/json
post
POST /v1/tokens HTTP/1.1
Host: api
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "authorization_code": "AF3DiOZy_x1jF9mKJqUwN5JDnpxk0GlwJMdfQOiAbc"
}
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZW1wZToweDEyMzQ1Njc4OTBhYmNkZWYiLCJpYXQiOjE2NjQ4OTc3NDIsImV4cCI6MTY2NDkwMTM0MiwiaXNzIjoiaHR0cHM6Ly9pc3N1ZXItc2VydmljZS5leGFtcGxlLmNvbSIsImF1ZCI6Imh0dHBzOi8vaXNzdWVyLXNlcnZpY2UuZXhhbXBsZS5jb20ifQ.Kt-SbnKU9S7BbCvHVsgCU3KnUYvekrFQCRRjYSlbGC0",
  "token_type": "Bearer",
  "expires_in": 3600
}