nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. SSO

Connected apps

gethttps://api.nsin.ir/oauth/grants

Auth: panel session — see API keys.

The applications this user has approved, as shown in the panel under Connected apps: every third-party app, and every first-party app (Nsincloud) holding write access to the account — the grant that carries the app's domain selection. First-party apps used only to sign in are not listed: that access is implicit in having an NSIN account.

Panel session only — an SSO token cannot read or change this list, so that no connected app can see or revoke another.

Responses

200Approved applications.

Content type: application/json

  • client_idstring
  • namestring
  • first_partyboolean
  • scopestring

    Space-separated scopes the user approved.

  • created_atstring (date-time)
  • last_used_atstring | null (date-time)
  • domain_accessDomainAccess

    Which domains a client-bound credential (NSIN SSO) may touch. all true means every domain, including ones added later. Otherwise domain_ids is the selection as stored and domains names the live ones among them; an empty selection is what a revoked grant leaves behind. GET /whoami reports it for SSO tokens and app-minted keys.

    Fields
    • allbooleanrequired
    • domain_idsarray of integer
    • domainsarray of object
      Item fields
      • idinteger
      • namestring
json
[
  {
    "client_id": "string",
    "name": "string",
    "first_party": true,
    "scope": "string",
    "created_at": "2026-01-01T00:00:00Z",
    "last_used_at": "2026-01-01T00:00:00Z",
    "domain_access": {
      "all": true,
      "domain_ids": [
        0
      ],
      "domains": [
        {
          "id": 0,
          "name": "string"
        }
      ]
    }
  }
]
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}

Example request

bash
curl -X GET "https://api.nsin.ir/oauth/grants" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc