Dexcom · Capability

Dexcom Developer API — Authentication

Dexcom Developer API — Authentication. 2 operations. Lead operation: Initiate OAuth 2.0 Authorization. Self-contained Naftiko capability covering one Dexcom business surface.

Run with Naftiko DexcomAuthentication

What You Can Do

GET
Userauthorization — Initiate OAuth 2.0 Authorization
/v1/v2/oauth2/login
POST
Exchangeauthorizationcode — Exchange Authorization Code for Tokens
/v1/v2/oauth2/token

MCP Tools

initiate-oauth-2-0-authorization

Initiate OAuth 2.0 Authorization

read-only idempotent
exchange-authorization-code-tokens

Exchange Authorization Code for Tokens

Capability Spec

dexcom-authentication.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Dexcom Developer API — Authentication
  description: 'Dexcom Developer API — Authentication. 2 operations. Lead operation: Initiate OAuth 2.0 Authorization. Self-contained
    Naftiko capability covering one Dexcom business surface.'
  tags:
  - Dexcom
  - Authentication
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DEXCOM_API_KEY: DEXCOM_API_KEY
capability:
  consumes:
  - type: http
    namespace: dexcom-authentication
    baseUri: https://api.dexcom.com
    description: Dexcom Developer API — Authentication business capability. Self-contained, no shared references.
    resources:
    - name: v2-oauth2-login
      path: /v2/oauth2/login
      operations:
      - name: userauthorization
        method: GET
        description: Initiate OAuth 2.0 Authorization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: client_id
          in: query
          type: string
          description: The application's registered client identifier.
          required: true
        - name: redirect_uri
          in: query
          type: string
          description: Registered redirect URI to which the authorization code is appended.
          required: true
        - name: response_type
          in: query
          type: string
          description: Must be set to `code` for authorization code flow.
          required: true
        - name: scope
          in: query
          type: string
          description: Must be `offline_access` (the only currently accepted value).
          required: true
        - name: state
          in: query
          type: string
          description: Opaque value used to maintain state between request and callback (CSRF protection).
    - name: v2-oauth2-token
      path: /v2/oauth2/token
      operations:
      - name: exchangeauthorizationcode
        method: POST
        description: Exchange Authorization Code for Tokens
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.DEXCOM_API_KEY}}'
  exposes:
  - type: rest
    namespace: dexcom-authentication-rest
    port: 8080
    description: REST adapter for Dexcom Developer API — Authentication. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v2/oauth2/login
      name: v2-oauth2-login
      description: REST surface for v2-oauth2-login.
      operations:
      - method: GET
        name: userauthorization
        description: Initiate OAuth 2.0 Authorization
        call: dexcom-authentication.userauthorization
        with:
          client_id: rest.client_id
          redirect_uri: rest.redirect_uri
          response_type: rest.response_type
          scope: rest.scope
          state: rest.state
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/oauth2/token
      name: v2-oauth2-token
      description: REST surface for v2-oauth2-token.
      operations:
      - method: POST
        name: exchangeauthorizationcode
        description: Exchange Authorization Code for Tokens
        call: dexcom-authentication.exchangeauthorizationcode
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: dexcom-authentication-mcp
    port: 9090
    transport: http
    description: MCP adapter for Dexcom Developer API — Authentication. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: initiate-oauth-2-0-authorization
      description: Initiate OAuth 2.0 Authorization
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: dexcom-authentication.userauthorization
      with:
        client_id: tools.client_id
        redirect_uri: tools.redirect_uri
        response_type: tools.response_type
        scope: tools.scope
        state: tools.state
      outputParameters:
      - type: object
        mapping: $.
    - name: exchange-authorization-code-tokens
      description: Exchange Authorization Code for Tokens
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: dexcom-authentication.exchangeauthorizationcode
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.