Authentication
Swift Messaging API is available in the secure multi-vendor secure IP network (MV-SIPN)The Swift architecture based on a network model that uses state-of-the-art security (secure IP network). The multi-vendor secure IP network also improves resilience and capacity, while avoiding dependency on a single network supplier. and it uses JWT Bearer grant type to authorise. Follow the information below to request an access token and use it to call the Swift Messaging API endpoints defined in Swift Messaging API Reference.
Request Access Token
Authorisation URLs
Refer to MV-SIPN URLs under Authorisation API Base URLs to determine the URL you should use, whether you are trying out the APIs in the sandbox, testing it in Pilot or using it in Live.
Authorization Header
Refer to Authorization Header to learn how to use the consumer-key and consumer-secret from the apps you created.
Request Body
Refer to JWT Bearer grant type to learn the request parameters you should include in the API request and which claims should be included in the JSON Web Token.
Use the following value for Scope in the API request.
| Environments | Scopes |
|---|---|
| Sandbox | swift.alliancecloud.api/access_to_service |
| Pilot | swift.alliancecloud.api!p/access_to_service |
| Live | swift.alliancecloud.api/access_to_service |
Calling the authorisation API
Call the token API with the Authorization Header and request body explained above. An access token will be returned in the API response. The access_token is valid for 30 minutes. You can use the refresh_token for up to 24 hours.
Use Access Token
When you have obtained an access token, you can use access token to call Swift Messaging API. You also have the option to refresh access token after it expires. We highly recommend that you dispose access token when it is no longer needed.