Got 403 error when run load test in k6 Cloud

Hi K6,

I created a load test and set it up running using a trial account. However, after we migrated to the k6 Cloud, I ran the same test, I got 403 error. What could be the root cause of the issue?


Hi @Cathy

Welcome to the community forum :wave: and thanks for opening the topic here.

Can you share your (sanitized) script?

I understand the test works when running locally, but when running on the cloud account you get the 403 status codes? Or was it working on the free trial cloud account as well and this happened when you moved to a paid plan?


Hi @eyeveebe ,

I believe it was working on the free trial cloud account and got 403 after moved to a paid plan.
Here is a part of the scripts.

import { sleep, check } from ‘k6’
import http from ‘k6/http’

export const options = {
ext: {
loadimpact: {
projectID: 3600046,
staticIPs: true,
distribution: {
distributionLabel1: { loadZone: ‘amazon:us:columbus’, percent: 100 },
thresholds: { http_req_duration: [{ threshold: ‘p(95)<5000’, abortOnFail: true }] },
scenarios: {
Scenario_1: {
executor: ‘ramping-vus’,
gracefulStop: ‘30s’,
stages: [{ target: 5, duration: ‘1m’ }],
startVUs: 2,
gracefulRampDown: ‘30s’,
exec: ‘scenario_1’,

export function scenario_1() {
let response

// Health Check
response = http.get(‘’, {
headers: {
Accept: ‘/’,
// Host: ‘’,
‘User-Agent’: ‘PostmanRuntime/7.29.2’,
‘Accept-Encoding’: ‘gzip, deflate, br’,
Connection: ‘keep-alive’,
‘Token **********************’,
check(response, { ‘status equals 200’: response => response.status.toString() === ‘200’ })

Hi @Cathy,

Thanks for sharing the script.

Is the script working locally? Are you able to run a curl with the same authorization token and see it work as well?

If the authorization token is still valid, do you know if has any restrictions on the access (e.g. requiring to declare the requestor’s IP or use of a VPN or similar to access that endpoint)? That could explain that a change in where the script is executed could cause a denied access as well.


Hi @eyeveebe ,

Yes, the script is working locally with the same authorization token.


Hi @Cathy

I’ve opened an e-mail thread with our support team with you in cc. I hope this helps resolve the issue. At this point it seems the applications endpoints block the requests coming from k6 cloud and the support team can help figure this out.



I am also facing the same issue, I am getting 403 Forbidden while same username/password/token working fine for playwright automation.


Hi @islam3

Welcome to the community forum :wave:

I discussed with the k6 cloud support team it is not a common issue they see, and they will probably need more information from your concrete case.

Can you open a ticket with the support team (e-mail