| Standard Carrier Alpha Code® (SCAC®) |
The Authenticate method validates your SCAC Web Service license with NMFTA and returns a JWT response. Basic auth is used to communicate with the Authentication method. Use this JWT to access all the other web methods. The token is valid for 24 hours. For all other API calls the JWT must be included in the Authorization header as a Bearer token.
For more information, see the following:
- Method Definition
- Authentication Parameter Name, Description, and Data Type
- Method Result
- Authentication Method JSON Result
- Authentication Method Result Definition
| Header Name | Description |
| Authentication | Basic Base64(<clientId>:<clientSecret>) |
|
An example Authentication method auth header: http basic auth is base64 encoded format. Basic Base64(<clientId>:<clientSecret>) EX: Base64(abc:123) => YWJjOjEyMw== Header Authentication: Basic YWJjOjEyMw== |
Method Definition
Http Method: POST
Basic Authentication: client Id and password sent in the Authorization header
URL: https://scacapi.scaccode.com/Authentication/auth
Authentication Parameter Name, Description, and Data Type
| Parameter Name | Description | Data Type |
| client Id / username | The client Id provided on your profile page |
|
| client secret / password | The client Id provided on your profile page. |
|
Method Result
Authentication Method JSON Result
| Result Status | Result JSON String |
| Success |
{ "access_token": "aaaaaaaa”, "token_type": "Bearer", "expires_in": 86400, "success": true, "errorMessage ": null } |
| Failure |
{ "access_token": null, "token_type": null, "expires_in": 0, "success": false, "errorMessage ": "Unauthorized" } |
Authentication Method Result Definition
| JSON Properties | Description | Data Type |
| access_token |
Encrypted token key. Pass this security token as the first parameter when requesting any SCAC web methods. NOTE: Token keys expire after 24 hours. (See TokenExpiration). |
|
| token_type | Authentication type is Bearer. |
|
| expires_in | Token expiration time is set to 24 hours from the time of authenticate. |
|
| success | Identifies if the method call completed successfully. |
|
| errorText | Error description. |
|