Skip to content
GitHub

Rotate Access Token

POST
/token/{id}

Management endpoint to rotate access token.

Authorizations

Parameters

Path Parameters

id
required
string

Responses

200

OK

object
access_token
required

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
value
required

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.

string
manage
required

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.

string format: uri
expires_in

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.

integer
access
required

A description of the rights associated with this access token.

Array
<= 3 items unique items
One of:
object
type
required

The type of resource request as a string. This field defines which other fields are allowed in the request object.

string
Allowed values: incoming-payment
actions
required

The types of actions the client instance will take at the RS as an array of strings.

Array<string>
unique items
Allowed values: create complete read read-all list list-all
identifier

A string identifier indicating a specific resource at the RS.

string format: uri
Examples
{
"access_token": {
"value": "OZB8CDFONP219RP1LT0OS9M2PMHKUR64TB8N6BW7",
"manage": "https://auth.rafiki.money/token/8f69de01-5bf9-4603-91ed-eeca101081f1",
"expires_in": 3600,
"access": [
{
"type": "outgoing-payment",
"actions": [
"create",
"read"
],
"identifier": "https://ilp.rafiki.money/alice",
"limits": {
"interval": "R12/2019-08-24T14:15:22Z/P1M",
"receiver": "https://ilp.rafiki.money/bob/incoming-payments/48884225-b393-4872-90de-1b737e2491c2",
"debitAmount": {
"value": "500",
"assetCode": "USD",
"assetScale": 2
}
}
}
]
}
}

400

Bad Request

401

Unauthorized

404

Not Found