Skip to content

Look up a client before redirecting

GET
/oauth/client-info
curl --request GET \
--url 'https://api.nsin.ir/oauth/client-info?client_id=nc_9f3c1d2e4b5a6789'

Confirms that a client_id exists and is active, and — when redirect_uri is given — that the URI is registered for it. The panel calls this before it redirects, so a mistyped client or redirect is reported on screen instead of being bounced to an unverified URL.

Nothing secret is returned.

client_id
required
string
Example
nc_9f3c1d2e4b5a6789
redirect_uri
string

When present, it must be one of the client’s registered URIs, matched exactly.

The client’s public description.

Media type application/json
object
name
string
description
string
first_party

NSIN’s own app — consent is implicit.

boolean
public

PKCE-only client with no secret.

boolean
Example generated
{
"name": "example",
"description": "example",
"first_party": true,
"public": true
}

The redirect_uri is not registered for this client.

Media type application/json

The RFC 6749 error shape, used by the NSIN SSO endpoints only. It is deliberately different from Error: OAuth clients match on the machine error code, and only show error_description to a developer.

object
error
required

The machine-readable code.

string
error_description

A human-readable explanation. Never match on this.

string
Example
{
"error": "invalid_grant",
"error_description": "authorization code is invalid or expired"
}

Unknown or inactive client.

Media type application/json

The RFC 6749 error shape, used by the NSIN SSO endpoints only. It is deliberately different from Error: OAuth clients match on the machine error code, and only show error_description to a developer.

object
error
required

The machine-readable code.

string
error_description

A human-readable explanation. Never match on this.

string
Example
{
"error": "invalid_grant",
"error_description": "authorization code is invalid or expired"
}