Pipedream · Arazzo Workflow

Pipedream Connect Token Mint and Validate

Version 1.0.0

Create a Connect token for a user and validate it against a target app.

1 workflow 1 source API 1 provider
View Spec View on GitHub ProCode_API_CompositionWorkflowsConnectMCPEmbedded IntegrationsManaged AuthAI AgentsArazzoWorkflows

Provider

pipedream

Workflows

token-mint-and-validate
Mint a Connect token and confirm its validity for an app.
Creates a Connect token for the external user, then validates it against the supplied app ID.
2 steps inputs: appId, environment, externalUserId, projectId outputs: connectToken, validation
1
createConnectToken
createToken
Generate a Connect token scoped to the external user for client-side authentication.
2
validateConnectToken
validateToken
Validate the freshly minted Connect token against the target app to confirm it can authorize an account connection.

Source API Descriptions

Arazzo Workflow Specification

pipedream-token-validation-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Pipedream Connect Token Mint and Validate
  summary: Create a Connect token for a user and validate it against a target app.
  description: >-
    A handshake-verification flow for Pipedream Connect's client-side
    authentication. The workflow mints a Connect token scoped to an external
    user, then validates that token against a target app to confirm it can be
    used to authorize an account connection. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: pipedreamApi
  url: ../openapi/pipedream-openapi.yml
  type: openapi
workflows:
- workflowId: token-mint-and-validate
  summary: Mint a Connect token and confirm its validity for an app.
  description: >-
    Creates a Connect token for the external user, then validates it against the
    supplied app ID.
  inputs:
    type: object
    required:
    - projectId
    - environment
    - externalUserId
    - appId
    properties:
      projectId:
        type: string
        description: The project ID, which starts with proj_.
      environment:
        type: string
        description: The Connect environment (development or production).
      externalUserId:
        type: string
        description: The end user identifier the token is minted for.
      appId:
        type: string
        description: The app ID to validate the token against.
  steps:
  - stepId: createConnectToken
    description: >-
      Generate a Connect token scoped to the external user for client-side
      authentication.
    operationId: createToken
    parameters:
    - name: project_id
      in: path
      value: $inputs.projectId
    - name: x-pd-environment
      in: header
      value: $inputs.environment
    requestBody:
      contentType: application/json
      payload:
        external_user_id: $inputs.externalUserId
        project_id: $inputs.projectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      connectToken: $response.body#/token
      connectLinkUrl: $response.body#/connect_link_url
  - stepId: validateConnectToken
    description: >-
      Validate the freshly minted Connect token against the target app to
      confirm it can authorize an account connection.
    operationId: validateToken
    parameters:
    - name: ctok
      in: path
      value: $steps.createConnectToken.outputs.connectToken
    - name: app_id
      in: query
      value: $inputs.appId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      validation: $response.body
  outputs:
    connectToken: $steps.createConnectToken.outputs.connectToken
    validation: $steps.validateConnectToken.outputs.validation