HTTP connection

HTTP connections are pretty straight forward. Just use the http client of your choice and GET, POST, PATCH, etc any URL you want. If you send a payload, it's alsways gonna be in JSON.

Authentication

For requests that require authentication, put your access token in the Authorization header as "Bearer <your_token>".


Authenticated request example (Node.js)

      const request = require('request-promise')

// Set it as default, so we don't have to do it on every single request.
request.defaults({
  baseUrl: 'https://api.nexushub.co'
  headers: {
    Authorization: 'Bearer <access_token>'
  }
})

const secretUserData = await request.get('/super/secret/userdata')

    

For more information on how to get an access token, check out the authentication guide .

loading

Connected!