πŸ”‘ Authentication and accessΒΆ

The ricloud API deals with two types of token:

  • A ricloud authentication token used to enable access to allow ricloud services. This takes a format like mOXINBsbDr7sWjRfxXwxtVfgjUreBG8yevdTFGAOjDMHuCWLDJvFr5uFpzYkQuoE. Each client uses one or more ricloud tokens to connect to the APIs, as each is associated with a set of permissions.
  • Service authentication tokens. These are tokens from the underlying cloud services which the API is working with. For instance, the iCloud has its own tokens.

Obtaining a ricloud tokenΒΆ

Note

Authentication to ricloud is performed using a token provided by Reincubate, which can be obtained by contacting enterprise@reincubate.com.

Authenticating with a ricloud tokenΒΆ

In order to communicate with the API, clients must have a valid token.

Note

Each client token is configured either for retrieval of content from aschannel or asstore. If the token is configured for one endpoint, it will not be possible to retrieve data from the other.

Successful requests will return an HTTP 200 response:

$ curl \
    -X GET \
    -H 'Authorization: Token <TOKEN>' \
    https://asapi.reincubate.com/account/ -D -
HTTP/1.0 200 OK
Content-Type: application/json
...

If an invalid token is supplied – or if it is missing – the client will receive an HTTP 401 response.

HTTP/1.0 401 Unauthorized
Content-Type: application/json
...

Service authentication tokensΒΆ

Some services have their own type of authentication tokens. That way, an account session can be reused or rehydrated, without the need to log-in again. One example of this is the icloud service.

Clients using the asmaster service are not exposed to service authentication tokens, as asmaster handles this for them. Clients using asapi are able to access tokens where the underlying service supports them. Invariably it is considered better to use these tokens where they exist instead of end-user credentials.

Token lifetimesΒΆ

Service Duration Notes
ricloud Indefinite Can be rotated by accounts team.
icloud ~months Also known as mmeAuthToken, will expire rapidly if not regularly used.