Integrates API Token

A few days ago we launched a new feature that allows users to make requests directly to our GraphQL API. This can be accomplished using one of the following methods:

Browser method

  1. Login to https://fluidattacks.com/integrates
  2. Open https://fluidattacks.com/integrates/api
  3. Make your queries.

Note: This method uses the same session as the web application, which lasts for 40 minutes. After that, you need to log in to https://fluidattacks.com/integrates again and refresh the https://fluidattacks.com/integrates/api page.
If you want your session to last for more than 40 minutes, you can use an API Token on a Desktop Client as shown below.

Desktop method

  1. Generate the API Token from the web application using the Token option in the left panel:

  1. Select an expiration date up to six months after the creation date:

  1. After clicking the “Proceed” button, you will see a string labeled “Access Token”. This will be your API Token:

  1. Store this token safely since this the only time that you will see it. With it, you can do the same things that you usually do on the Integrates web application.

You can also generate the API Token using the next GraphQL mutation on https://fluidattacks.com/integrates/api where expirationTime is a Unix Timestamp

mutation {
  updateAccessToken(expirationTime:1577854799) {
    sessionJwt
  }
}

You will get the API Token under the sessionJwt value:

  1. Download GraphiQL Desktop Client from https://electronjs.org/apps/graphiql

  2. Set the GraphQL Endpoint as https://fluidattacks.com/integrates/api :

  1. Add a new Header in Edit HTTP Headers with the name AUTHORIZATION and the value Bearer <api-token> , where <api-token> is the token generated in the previous steps:

Done! Now you can make queries with the same API Token for up to six months (it depends on the expirationTime that you set earlier):

Resources

  • Available queries and mutations are shown on the right panel on both the browser and the desktop client:
    image
  • GraphQL Documentation: https://graphql.org/learn/
3 Likes