Look up a client before redirecting
gethttps://api.nsin.ir/oauth/client-info
No authentication.
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.
Query parameters
- client_idstringrequiredquery
- redirect_uristringquery
When present, it must be one of the client's registered URIs, matched exactly.
Responses
200The client's public description.
Content type: application/json
- namestring
- descriptionstring
- first_partyboolean
NSIN's own app — consent is implicit.
- publicboolean
PKCE-only client with no secret.
{
"name": "string",
"description": "string",
"first_party": true,
"public": true
}400The redirect_uri is not registered for this client.
Content type: application/json
- errorstringrequired
The machine-readable code.
- error_descriptionstring
A human-readable explanation. Never match on this.
{
"error": "invalid_grant",
"error_description": "authorization code is invalid or expired"
}404Unknown or inactive client.
Content type: application/json
- errorstringrequired
The machine-readable code.
- error_descriptionstring
A human-readable explanation. Never match on this.
{
"error": "invalid_grant",
"error_description": "authorization code is invalid or expired"
}Example request
curl -X GET "https://api.nsin.ir/oauth/client-info?client_id=nc_9f3c1d2e4b5a6789" \
-H "Authorization: Bearer $NSIN_API_KEY"