API integration
The HyperMint API allows you to maintain and interact with contracts created and deployed through the UI.
Below provided is a Postman collection for the HyperMint APIs.
Base URL
The API base url for all requests is https://api.hypermint.com/v1
Content-Type header needs to be set to application/json
Authentication
Each request must be authenticated using two headers: HM_ACCESS_KEY
and HM_ACCESS_KEY_SECRET
.
The values for these headers can be obtained from the Account page within the API Tokens list.
New tokens can be created at any time by users with the following roles:
Owner
Contributor
Tokens allow for a name to be set to keep track of what each token is being used for.
The key can be viewed at anytime as a reference however, the secret is only shown on creation and must be stored securely by yourself.
Tokens grant access to all contracts on an account.
If you believe one of your tokens has become compromised, it can be immediately disabled from the Account page
Never expose these credentials client side as they grant direct access to your contracts and minting. Instead use the Client SDK or proxy requests through your own servers
The following sample can be used to communicate with the API:
const axios = require('axios');
// ...
const response = await axios.get('https://api.hypermint.com/v1/contract/...', {
headers: {
'HM_ACCESS_KEY': 'xxx',
'HM_ACCESS_KEY_SECRET': 'xxx'
}
});
Feedback
Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.
Updated 9 months ago