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

Refresh OAuth credential

Refresh an OAuth credential's access token.

POST/v1/credentials/{credentialId}/refresh

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key authentication. Keys are prefixed with environment:

  • npk_live_ for production
  • npk_test_ for testing/staging

In: header

Path Parameters

credentialId*string

Credential ID

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.npayload.com/v1/credentials/string/refresh"
{
  "id": "string",
  "name": "string",
  "connectorId": "string",
  "type": "oauth2",
  "status": "valid",
  "expiresAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "string",
    "details": {}
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}

Was this page helpful?