Environment setup
Before we start interacting with the Method API, let's first make sure you have API keys for the
💡 Tip Following this guide in the
development environment which you can get by signing up in the Method Dashboard.API environments
Although this guide will be done in thedevelopment environment, each step can also be done in the sandbox, and production environments. Learn more about how each environment works.💡 Tip Following this guide in the
development environment will not move real money from one account to another, nor will any data be real.Verifying access
Let's verify that your API keys work. We'll do this by performing a health check of thedevelopment environment. You can utilize any of Method's official API client libraries to do this.Sample API key
sk_WyZEWVfTcH7GqmPzUPk65Vjc
- cURL
- Node.js
- Python
GET
/pingcurl https://dev.methodfi.com/ping \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc"
GET
/pingconst { Method, Environments } = require('method-node');
const method = new Method({
apiKey: 'sk_WyZEWVfTcH7GqmPzUPk65Vjc',
env: Environments.dev,
});
await method.ping();
GET
/pingfrom method import Method
method = Method(env='dev', api_key='sk_WyZEWVfTcH7GqmPzUPk65Vjc')
method.ping()
RESPONSE
{
"success": true,
"data": null,
"message": "pong"
}