Using Strava API v3 and create activity method, I'd like to mute activity. So, according to the docs, I should set hide_from_home to true.
However, the flag doesn't work correctly. Meaning, I'm receiving response containing:
"hide_from_home": falseAnd, activity is visible in Active Feed.
I tried to send the request via Flurl (C#) and curl (Postman).
The Flurl code looks more like a:
var rs = await host.AppendPathSegments("activities") .WithOAuthBearerToken(accessToken) .AllowAnyHttpStatus() .PostUrlEncodedAsync(new Dictionary<string, dynamic> { { "name", "😎 test from api" }, { "type", "Walk" }, // https://developers.strava.com/docs/reference/#api-models-ActivityType { "sport_type", "Walk" }, // https://developers.strava.com/docs/reference/#api-models-SportType { "start_date_local", DateTime.Now.AddMilliseconds(-1).ToString("s", CultureInfo.InvariantCulture) }, { "elapsed_time", 2 }, // In seconds { "hide_from_home", true }, }) .ReceiveString();I tried to use dynamic, object and string as a dictionary value type and tried to pass true (as a boolean) and "true" (as a string), but none of these worked.
For curl, I imported example from the Strava Playground (Swagger UI) [Authorization removed in that example]:
curl -X POST "https://www.strava.com/api/v3/activities" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "name=Api&type=Walk&sport_type=Walk&start_date_local=2022-08-12&elapsed_time=2&hide_from_home=true"
So, the question: How to create muted activity via Strava API?
Corresponding Stack Overflow thread: https://stackoverflow.com/questions/68872357/strava-api-how-set-activity-type-for-uploaded-activity