What this API does:
This API lets you create a new access token request via Virgin Money.
There are three ways you can do this using the below grant types:
- Client credentials
- Required parameters to be passed are; grant_type=client_credentials and scope=accounts<or>payments<or>fundsconfirmations
- Authorisation code
- Required parameters to be passed are; grant_type=authorization_code, scope=accounts<or>payments<or>fundsconfirmations and code=authorization_code (for sandbox, the authorization code is available within our test data Link opens in a new window)
- Refresh token
- Required parameters to be passed are; grant_type=refresh_token, scope=accounts<or>payments<or>fundsconfirmations and refresh_token
In order to use this endpoint, you must first be Dynamically Registered with Virgin Money.
The access token which will be in JSON web token format (encoded JWT). The JWT token will allow you access to the resource endpoints.
Endpoint configuration
Sandbox: cb.sandbox-api-nc.cybservices.co.uk/open-banking/v3.0/oauth2/token
Production: api.openbanking.virginmoney.com/open-banking/v3.0/oauth2/token
API calls
Default
Name | Description |
---|---|
Authorization * string (header) | Base64 encode(ClientID:ClientSecrete) |
Content-Type * string (header) | application/x-www-form-urlencoded |
x-ob-client-host-header string (header) | Original URL |
x-jws-signature string (header) | JOSE-signature |
grant_type * string (formData) | grant_type Available values : client_credentials, authorization_code, refresh_token |
scope * string (formData) | scope Available values : openid accounts, openid payments, accounts, payments |
code string (formData) | code from Authorization |
refresh_token string (formData) | refresh_token |
Responses
Code | Description | ||||||||||||||||||
201 | Created { #/definitions/tokenResponsetokenResponse{
Headers:
| ||||||||||||||||||
400 | Bad request { #/definitions/OBErrorResponse1OBErrorResponse1{
| ||||||||||||||||||
401 | Unauthorized | ||||||||||||||||||
403 | Forbidden | ||||||||||||||||||
404 | Not found | ||||||||||||||||||
405 | Method Not Allowed | ||||||||||||||||||
406 | Not Acceptable | ||||||||||||||||||
429 | Too Many Requests Headers:
| ||||||||||||||||||
500 | Internal Server Error { #/definitions/OBErrorResponse1OBErrorResponse1{
|
Models
scope* | string scope |
grant_type* | string grant_type [ client_credentials, authorization_code, refresh_token ] |
auth_code | string |
refresh_token | string |
accessToken | string decoded JWT |
tokenType | string Bearer Token |
refreshToken | string Refresh Token UUID |
idToken | string decoded JWT |
description: | An array of detail error codes, and messages, and URLs to documentation to help remediation. | ||||||||
Code* | string minLength: 1 maxLength: 40 High level textual error code, to help categorize the errors. | ||||||||
Id | string minLength: 1 maxLength: 40 A unique reference for the error instance, for audit purposes, in case of unknown/unclassified errors. | ||||||||
Message* | string minLength: 1 maxLength: 500 Brief Error message, e.g., 'There is something wrong with the request parameters provided' | ||||||||
Errors* | [ minItems: 1#/definitions/OBError1OBError1{
|
ErrorCode* | string minLength: 1 maxLength: 128 Low level textual error code, e.g., UK.OBIE.Field.Missing |
Message* | string minLength: 1 maxLength: 500 A description of the error that occurred. e.g., 'A mandatory field isn't supplied' or 'RequestedExecutionDateTime must be in future' |
Path | string minLength: 1 maxLength: 500 Recommended but optional reference to the JSON Path of the field with error, e.g., Data.Initiation.InstructedAmount.Currency |
Url | string URL to help remediate the problem, or provide more information, or to API Reference, or help etc |
Having trouble?
Contact our dedicated team members via our ticketing system or via our support mailbox