Look up a client before redirecting
const url = 'https://api.nsin.ir/oauth/client-info?client_id=nc_9f3c1d2e4b5a6789';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Example
nc_9f3c1d2e4b5a6789When present, it must be one of the client’s registered URIs, matched exactly.
Responses
Section titled “ Responses ”The client’s public description.
object
NSIN’s own app — consent is implicit.
PKCE-only client with no secret.
Example generated
{ "name": "example", "description": "example", "first_party": true, "public": true}The redirect_uri is not registered for this client.
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
The machine-readable code.
A human-readable explanation. Never match on this.
Example
{ "error": "invalid_grant", "error_description": "authorization code is invalid or expired"}Unknown or inactive client.
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
The machine-readable code.
A human-readable explanation. Never match on this.
Example
{ "error": "invalid_grant", "error_description": "authorization code is invalid or expired"}