Mineful

The Mineful Developer Hub

Welcome to the Mineful developer hub. You'll find comprehensive guides and documentation to help you start working with Mineful as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Authorization

Mineful is an OAuth2 provider. This is necessary to gain access to the endpoints of this API.

AUTHENTICATED REQUESTS

Method One: Simple Bearer Token

To make requests to the Mineful API, the system checks if you have set up a valid application on the Mineful Developer Platform. This is done by checking the Bearer token, which you add in the request header of your api request. Read on to see how you can use Oauth2 to receive a Bearer token for your users, on whose behalf you are making the request.

curl -X POST \
  https://developers.coinsta.sh/v1/auth \
  -H 'Authorization: application_id <APPLICATION_ID>, client_secret <CLIENT_SECRET>' \
  -H 'Cache-Control: no-cache' \
  -H 'content-type: multipart/form-data' \
  -F 'session[email]=<USER_EMAIL>' \
  -F 'session[password]=<USER_PASSWORD>'

For now, we use a simple unique identifier (email) and password authorisation method. It will return something like...

{
    "user": {
        "id": 1,
        "email": "user@example.com",
        "username": "satoshi",
        "user_preferences": [],
        "is_me": true,
        "profile": {
            "id": 74,
            "first_name": "satoshi",
            "last_name": "nakamoto",
            "birth_date": null,
            "sex": "male",
            "time_zone": "",
            "avatar_url": null,
            "wantscredit": "f",
            "temporary": "f"
        },
        "organisations": [
            {
                "id": 1,
                "name": "ACME Company",
                "logo_url": null,
                "logo_properties": null,
                "current_user_roles": []
            }
        ]
    },
    "access_token": "<BEARER_TOKEN>"
}

Use the Access Token value as the <BEARER_TOKEN>

curl -X GET \
  https://developers.coinsta.sh/v1/currency \
  -H 'Authorization: Bearer <BEARER_TOKEN>' \
  -H 'Cache-Control: no-cache'

In future this will most likely become an Implicit Grant flow for public release. Stay tuned for info on that.

Method Two: Client Credentials Flow - Application ID & Client Secret

curl -X GET \
  https://developers.coinsta.sh/v1/currency \
  -H 'Authorization: application_id <APPLICATION_ID>, client_secret <CLIENT_SECRET>' \
  -H 'Cache-Control: no-cache'

Some API endpoints can be accessed by just entering the application ID and client secret, which you receive after setting up a valid application on the Mineful Developer Platform and provided in the request header. This method is easier to set up, you no longer need the OAuth2 method, but only allows access to some restricted API endpoints.

Authorization