Invalid token when connecting On Call with Grafana Cloud

  • What Grafana version and what operating system are you using?

Grafana v8.4.5 and Ubuntu 18.04.5 LTS

  • What are you trying to achieve?

Connect grafana On Call on-premise installation with Grafana Cloud (free account)

  • How are you trying to achieve it?

I’ve created an API Key from https://my-instance.grafana.net/a/grafana-oncall-app/settings

  • What happened?

When I paste that key on https://,y-grafana/a/grafana-oncall-app/cloud I got an “Invalid token” error"

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

On the oncall container I see this log entries:

 2023-02-24 15:03:56 source=engine:app google_trace_id=none logger=apps.oss_installation.models.cloud_connector Unable to sync with cloud. GRAFANA_CLOUD_ONCALL_TOKEN is invalid
 2023-02-24 15:03:56 source=engine:app google_trace_id=none logger=apps.oss_installation.models.cloud_connector Unable to sync with cloud. GRAFANA_CLOUD_ONCALL_TOKEN is invalid

Thank you in advance for your help

1 Like

this topic can be closed

Could you inform as to how you resolved the issue?

what was the fix here?

The token between my grafana on premise and the grafana cloud was set wrong

“The token between my grafana on premise and the grafana cloud was set wrong”
Can you explain please? I have exactly the same problem.
my token looks like b2b67cefd63c54efd6ecfe016a3745a4a2dc455cec000ca73d5b9b84facac242
(32 rand hex)

curl -H “Authorization: ” https://oncall-prod-eu-west-0.grafana.net/oncall/api/v1/integrations
is working

I had the same problem and fixed it by setting the API URL manually through the environment variable GRAFANA_CLOUD_ONCALL_API_URL. The URL can be found on the Grafana Cloud OnCall settings page.

1 Like

have you set this env for grafana or for oncall ? still cant to make it work.
@DUGi any progress with it ?

if anyone need it. I’ve solved it by add env for grafana,

ONCALL_CLOUD_API_URL: "https://oncall-prod-eu-west-0.grafana.net/oncall/api/v1/integrations"

I can’t get it to work. Can anyone help me? What infos do I need to provide?

No luck I added to docker compose:

  ONCALL_CLOUD_API_URL: https://oncall-prod-eu-west-0.grafana.net/oncall/api/v1/integrations
  GRAFANA_CLOUD_ONCALL_API_URL: https://oncall-prod-eu-west-0.grafana.net/oncall
  GRAFANA_CLOUD_ONCALL_TOKEN: ****************

but it is sstill saying invalid token.
I also tied to add that token via GUI but result is the same.

Same problem.
I don’t understand why there’s no documentation about this.

How does one set this value for non-Docker Grafana deployments? I’m running Grafana from a deb repository and OnCall on a different machine using Docker, as it was a later addition and it has served us well.

But Grafana won’t connect to the cloud instance at all, I checked with tcpdump. So missing this setting seems relevant.