Authentication
How to authenticate requests to the Transfers Connect API
To authenticate API requests, your public and private keys should be passed as request headers. Here's a JavaScript example with Apollo Boost:
1
const ApolloClient = require('apollo-boost').default;
2
​
3
const publicKey = process.env.MERCHANT_PUBLIC_KEY
4
const privateKey = process.env.MERCHANT_PRIVATE_KEY
5
​
6
const client = new ApolloClient({
7
uri: process.env.TRANSFERS_CONNECT_API,
8
fetch: fetch,
9
headers: {
10
authorization: 'Bearer ' + publicKey,
11
'Private-Key': privateKey,
12
}
13
})
Copied!
​
Last modified 2mo ago
Copy link