Skip to main content

Page contents

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:

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

NameDescription
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

CodeDescription
201
Created

{
"accessToken": "string",
"tokenType": "string",
"refreshToken": "string",
"idToken": "string"
}
#/definitions/tokenResponsetokenResponse{
accessTokenstring
decoded JWT
tokenTypestring
Bearer Token
refreshTokenstring
Refresh Token UUID
idTokenstring
decoded JWT
}

Headers:

NameDescriptionType
x-fapi-interaction-id
An RFC4122 UID used as a correlation id.
string
400
Bad request

{
"Code": "string",
"Id": "string",
"Message": "string",
"Errors": [
{
"ErrorCode": "string",
"Message": "string",
"Path": "string",
"Url": "string"
}
]
}
#/definitions/OBErrorResponse1OBErrorResponse1{
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.

Idstring
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'
OBIE doesn't standardise this field

Pathstring
minLength: 1

maxLength: 500

Recommended but optional reference to the JSON Path of the field with error, e.g., Data.Initiation.InstructedAmount.Currency

Urlstring

URL to help remediate the problem, or provide more information, or to API Reference, or help etc

}]
}
401
Unauthorized
403
Forbidden
404
Not found
405
Method Not Allowed
406
Not Acceptable
429
Too Many Requests

Headers:

NameDescriptionType
Retry-After
Number in seconds to wait
integer
500
Internal Server Error

{
"Code": "string",
"Id": "string",
"Message": "string",
"Errors": [
{
"ErrorCode": "string",
"Message": "string",
"Path": "string",
"Url": "string"
}
]
}
#/definitions/OBErrorResponse1OBErrorResponse1{
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.

Idstring
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'
OBIE doesn't standardise this field

Pathstring
minLength: 1

maxLength: 500

Recommended but optional reference to the JSON Path of the field with error, e.g., Data.Initiation.InstructedAmount.Currency

Urlstring

URL to help remediate the problem, or provide more information, or to API Reference, or help etc

}]
}

Models

tokenRequest{
scope*string
scope
grant_type*string

grant_type

Enum:
[ client_credentials, authorization_code, refresh_token ]
auth_codestring
refresh_tokenstring
}

tokenResponse{
accessTokenstring
decoded JWT
tokenTypestring
Bearer Token
refreshTokenstring
Refresh Token UUID
idTokenstring
decoded JWT
}

OBErrorResponse1{
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.

Idstring
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'
OBIE doesn't standardise this field

Pathstring
minLength: 1

maxLength: 500

Recommended but optional reference to the JSON Path of the field with error, e.g., Data.Initiation.InstructedAmount.Currency

Urlstring

URL to help remediate the problem, or provide more information, or to API Reference, or help etc

}]
}

OBError1{
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'
OBIE doesn't standardise this field

Pathstring
minLength: 1

maxLength: 500

Recommended but optional reference to the JSON Path of the field with error, e.g., Data.Initiation.InstructedAmount.Currency

Urlstring

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

OpenBankingResponse@virginmoney.com

Contact us Link opens in a new window