Overview
Obtaining Client Credentials
To authenticate using Client Credentials, you will need:- Client ID: Your integration SID (e.g.,
II9d19b343a93244b9df14104509a0b9b3) - Client Secret: Your integration secret
Token Endpoint
Request
Authenticate using HTTP Basic Auth with your Client ID as the username and Client Secret as the password.grant_type(required): Must beclient_credentialsscope(optional): Usesmarter_iamto include IAM token in the response.
cURL Examples
Using HTTP Basic Auth (recommended):Scopes
For machine-to-machine authentication using Client Credentials, the following scope is available:
Note: The
smarter_iam scope is optional. When omitted, the access token still authenticates your client but may have reduced authorization context. The actual permissions are determined by the IAM policy attached to your integration.
Response
access_token- The JWT access token to use in API requeststoken_type- Always “Bearer”expires_in- Number of seconds until the token expires (3600 = 1 hour)expires_at- ISO 8601 UTC timestamp indicating when the token expires
Using the Access Token
Include the access token in theAuthorization header of your API requests:
Error Responses
The API returns specific HTTP status codes and error messages to help you handle authentication and authorization issues:401 Unauthorized
Returned when the request lacks valid authentication credentials or the token has expired. Response includes:403 Forbidden
Returned when the token is valid but the client does not have permission to perform the requested action on the specified resource. Example response:- 401 = Authentication problem (invalid/missing/expired token)
- 403 = Authorization problem (valid token, but wrong permissions)
Token Expiration
Access tokens have a default lifetime of 1 hour (3600 seconds) from the time of issuance. The exact expiration time is provided in theexpires_at field as an ISO 8601 UTC timestamp.
Token Expiration Behavior:
- Tokens expire at the exact time specified in
expires_at - Expiration is not based on inactivity (sliding window)
- You must request a new token before the expiration time
- Refresh tokens are not issued for machine-to-machine authentication
- Token lifetime can be customized per integration - contact your account manager if you need a different TTL
SDKs and Libraries
You can use standard OAuth 2.0 libraries to handle token generation and management: Node.jssimple-oauth2- Simple OAuth2 client for Node.jsclient-oauth2- OAuth2 client for browsers and Node.js
requests-oauthlib- OAuth library built on top of Requestsoauthlib- Generic OAuth library
league/oauth2-client- OAuth 2.0 client for PHP
spring-security-oauth2- Spring Security OAuthscribejava- OAuth library for Java
IdentityModel- OAuth 2.0 client library for .NET
Token Verification
Access tokens are signed JWTs that can be verified using SmarterServices’ published JSON Web Key Set:iss), audience (aud), and expiration (exp) claims locally without round-tripping to SmarterServices.
Token Security
- Store your Client ID and Client Secret securely
- Never expose credentials in client-side code or public repositories
- Rotate secrets periodically
- If your credentials are compromised, contact your SmarterProctoring account manager immediately to have them revoked and reissued
← Back to Authentication Overview
