AgnicPay

Authentication

Authenticate with AgnicPay using OAuth2 or API tokens

Authentication

AgnicPay supports two authentication methods to access the API and AI Gateway.

Authentication Methods

Which Should I Use?

Use CaseRecommended Method
Your own scripts/agentsAPI Tokens
CI/CD pipelinesAPI Tokens
Third-party app integrationOAuth2
User-facing applicationsOAuth2
MCP serversAPI Tokens
N8N workflowsOAuth2

Quick Comparison

FeatureAPI TokensOAuth2
Setup complexitySimpleModerate
User authorizationNot requiredRequired
Spending limitsSet by youSet by user
Token lifespanUntil revoked30-60 days
Best forPersonal useMulti-user apps

Token Formats

All AgnicPay tokens follow a predictable format:

PrefixTypeDescription
agnic_tok_API TokenDirect API access token
agnic_at_Access TokenOAuth2 access token
agnic_rt_Refresh TokenOAuth2 refresh token

Next Steps

On this page