Endpoint
Authentication
Requires a Grantex grant token (not an API key) in the Authorization header. This is a public endpoint — no developer API key is needed.
The grant token must also carry a credential scope for the requested service. Accepted scopes are:
*
<service>:*
<service>:read
<service>:credentials:read
vault:<service>:*
vault:<service>:read
vault:credentials:exchange
Request Body
Example Request
Response — 200 OK
Response Fields
This endpoint returns the raw access token. The grant token’s sub (principal), dev (developer), and scp (scopes) claims are enforced before decrypting a credential. Keep grant scopes and expiry narrow.
Rate Limits
This endpoint is limited to 20 requests per minute per grant token.
Error Responses
How It Works
- The agent presents its Grantex grant token.
- The server verifies the JWT signature and extracts the
sub (principal ID), dev (developer ID), and scp (scopes) claims.
- The requested
service must match one of the token credential scopes listed above.
- The server looks up the vault credential matching
(developerId, principalId, service).
- If found, the encrypted access token is decrypted and returned.
This allows agents to access upstream services without ever seeing the raw credentials at configuration time — credentials are stored once by the developer and retrieved at runtime by authorized agents.
SDK Examples