Skip to main content
npayload is launching soon.
npayloadDocs
API ReferenceCredentials

Start OAuth flow

Initiate OAuth authentication flow for a connector.

POST/v1/credentials/oauth/start

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key authentication. Keys are prefixed with environment:

  • npk_live_ for production
  • npk_test_ for testing/staging

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.npayload.com/v1/credentials/oauth/start" \  -H "Content-Type: application/json" \  -d '{    "connectorId": "string",    "redirectUri": "http://example.com"  }'
{
  "authorizationUrl": "http://example.com",
  "state": "string"
}
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Validation failed",
    "details": {
      "field": "name",
      "reason": "Name is required"
    }
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Was this page helpful?