Grant Request
POST /
Make a new grant request
Request Body required
object
Information about the subject for which the client is requesting information
object
The formats of subject identifiers that the client can accept
Specific identifiers for the subject for which the client is requesting information
object
object
A description of the rights associated with this access token.
object
The type of resource request as a string. This field defines which other fields are allowed in the request object.
The types of actions the client instance will take at the RS as an array of strings.
A string identifier indicating a specific resource at the RS.
object
The type of resource request as a string. This field defines which other fields are allowed in the request object.
The types of actions the client instance will take at the RS as an array of strings.
A string identifier indicating a specific resource at the RS.
object
The URL of the incoming payment that is being paid.
object
The URL of the incoming payment that is being paid.
All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
object
The URL of the incoming payment that is being paid.
All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
object
The type of resource request as a string. This field defines which other fields are allowed in the request object.
The types of actions the client instance will take at the RS as an array of strings.
Examples
{ "access_token": { "access": [ { "type": "outgoing-payment", "actions": [ "create", "read" ], "identifier": "https://ilp.interledger-test.dev/alice", "limits": { "receiver": "https://ilp.interledger-test.dev/incoming-payments/45a0d0ee-26dc-4c66-89e0-01fbf93156f7", "interval": "R12/2019-08-24T14:15:22Z/P1M", "debitAmount": { "value": "500", "assetCode": "USD", "assetScale": 2 } } } ] }, "client": "https://webmonize.com/.well-known/pay", "interact": { "start": [ "redirect" ], "finish": { "method": "redirect", "uri": "https://webmonize.com/return/876FGRD8VC", "nonce": "4edb2194-dbdf-46bb-9397-d5fd57b7c8a7" } }}
{ "subject": { "sub_id_formats": [ "uri" ], "sub_ids": [ "https://wallet.example.com/alice" ] }, "client": "https://webmonize.com/.well-known/pay", "interact": { "start": [ "redirect" ], "finish": { "method": "redirect", "uri": "https://webmonize.com/return/876FGRD8VC", "nonce": "4edb2194-dbdf-46bb-9397-d5fd57b7c8a7" } }}
{ "access_token": { "access": [ { "type": "incoming-payment", "actions": [ "create", "read" ], "identifier": "http://ilp.interledger-test.dev/bob" } ] }, "client": "https://webmonize.com/.well-known/pay"}
Responses
200
OK
object
object
The URI to direct the end user to.
Unique key to secure the callback.
If the AS determines that the request can be continued with additional requests, it responds with the continue field.
object
A unique access token for continuing the request, called the “continuation access token”.
object
The URI at which the client instance can make continuation requests.
The amount of time in integer seconds the client instance MUST wait after receiving this request continuation response and calling the continuation URI.
object
A single access token or set of access tokens that the client instance can use to call the RS on behalf of the RO.
object
The value of the access token as a string. The value is opaque to the client instance. The value SHOULD be limited to ASCII characters to facilitate transmission over HTTP headers within other protocols without requiring additional encoding.
The management URI for this access token. This URI MUST NOT include the access token value and SHOULD be different for each access token issued in a request.
The number of seconds in which the access will expire. The client instance MUST NOT use the access token past this time. An RS MUST NOT accept an access token past this time.
A description of the rights associated with this access token.
object
The type of resource request as a string. This field defines which other fields are allowed in the request object.
The types of actions the client instance will take at the RS as an array of strings.
A string identifier indicating a specific resource at the RS.
object
The type of resource request as a string. This field defines which other fields are allowed in the request object.
The types of actions the client instance will take at the RS as an array of strings.
A string identifier indicating a specific resource at the RS.
object
The URL of the incoming payment that is being paid.
object
The URL of the incoming payment that is being paid.
All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
object
The URL of the incoming payment that is being paid.
All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
object
The type of resource request as a string. This field defines which other fields are allowed in the request object.
The types of actions the client instance will take at the RS as an array of strings.
If the AS determines that the request can be continued with additional requests, it responds with the continue field.
object
A unique access token for continuing the request, called the “continuation access token”.
object
The URI at which the client instance can make continuation requests.
The amount of time in integer seconds the client instance MUST wait after receiving this request continuation response and calling the continuation URI.
Examples
{ "interact": { "redirect": "https://auth.interledger-test.dev/4CF492MLVMSW9MKMXKHQ", "finish": "4105340a-05eb-4290-8739-f9e2b463bfa7" }, "continue": { "access_token": { "value": "33OMUKMKSKU80UPRY5NM" }, "uri": "https://auth.interledger-test.dev/continue/4CF492MLVMSW9MKMXKHQ", "wait": 30 }}
{ "access_token": { "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0", "manage": "https://auth.interledger-test.dev/token/dd17a202-9982-4ed9-ae31-564947fb6379", "expires_in": 3600, "access": [ { "type": "incoming-payment", "actions": [ "create", "read" ], "identifier": "https://ilp.interledger-test.dev/bob" } ] }, "continue": { "access_token": { "value": "33OMUKMKSKU80UPRY5NM" }, "uri": "https://auth.interledger-test.dev/continue/4CF492MLVMSW9MKMXKHQ" }}
400
Bad Request
401
Unauthorized
object
object
500
Internal Server Error