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"