Provide "Missing Authentication Token"

I created a new workspace with a Post table. In the API Explorer, I can run this query successfully:

query {
  postsList {
    items {
			id
      description
      content
    }
  }
}

But when I visit my endpoint directly at https://api.8base.com/cjwt04zsw000201jvew2m1dzb, I receive an error message:

{“message”:“Missing Authentication Token”}

How can I access my endpoint directly?

@nilan there are several ways you can access your data:

  1. By enabling Guest access to the Post table. Go to Settings > Roles > Guest and enable Read permission for the Post table, as shown on the image below. Please keep in mind that this will open your Post data to the world - anyone with the endpoint URL can access it.

  2. By generating an API token. First, create a new Role in Settings > Roles and give it access to read Posts. Next, create a new API token in Settings > API Tokens and choose the role you just created. When making a request add Authorization header and set its value to "Bearer YOUR_API_TOKEN". You can see examples here.

  3. By implementing authentication flow in your front-end app. You can read docs on how to implement authentication if your React app here.

1 Like

Hello, I’ve used all advices, but when I sign up (userSignUpWithPassword) it gives me {“message”:“Missing Authentication Token”}, when sign in it gives invalid request, can you help me?