# ActivityPub: no user-agent sent with request Failure while creating client

**URL:** https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245
**Category:** Feature
**Tags:** activitypub
**Created:** [December 14, 2025, 1:53am UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245 "2025-12-14T01:53:05Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ayr-ton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ayr-ton/32/534014_2.png) [@ayr-ton](https://meta.discourse.org/u/ayr-ton)
#### Post date: [December 14, 2025, 1:53am UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/1 "2025-12-14T01:53:05Z")

</div>

Hey there,

I’m experiencing issues when trying to communicate with some Mastodon instances.

Seems that many admins have a config requirement to only interact with apps/servers that provide user-agent, which I can see the activitypub plugin is not providing.

Do you think you could add a user-agent like this to future versions requests?

‘Discourse-ActivityPub/x.y.z (+https://eg-discourse-domain.com)’ or similar?

This will fix both federation and the ability to link profiles to mastodon instances that have this requirement.

Thank you for your time reviewing this.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 15, 2025, 2:46pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/2 "2025-12-15T14:46:17Z")

</div>

This is a reasonable feature request. I gave it a shot in this PR: [DEV: Add support for optional User-Agent header in outgoing requests by pmusaraj · Pull Request #268 · discourse/discourse-activity-pub · GitHub](https://github.com/discourse/discourse-activity-pub/pull/268)

---

<div class="post-metadata">

### Author: ![ayr-ton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ayr-ton/32/534014_2.png) [@ayr-ton](https://meta.discourse.org/u/ayr-ton)
#### Post date: [December 15, 2025, 7:04pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/3 "2025-12-15T19:04:21Z")

</div>

@pmusaraj Federation is working as expected! Thank you!

Now I’m still seeing the same error when trying to vinculate an actor to my discourse profile, complaing that the user-agent is null (from the instance logs) and failing to create client.

The link for my profile is like:

[https://example.com/u/ayr-ton/preferences/activity-pub](https://example.com/u/ayr-ton/preferences/activity-pub)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 15, 2025, 7:05pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/4 "2025-12-15T19:05:27Z")

</div>

Can you share a screenshot of the instance log with the error?

---

<div class="post-metadata">

### Author: ![ayr-ton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ayr-ton/32/534014_2.png) [@ayr-ton](https://meta.discourse.org/u/ayr-ton)
#### Post date: [December 15, 2025, 7:14pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/5 "2025-12-15T19:14:00Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/b/d/2/bd21228756228180fe6ab216a901942f00a55e9e.jpeg)  
An error occurred: no user-agent sent with request Failure to create client

Log that I’m seeing in the instance is the same: “no user-agent”

Those errors was also happening when users from the same instance was trying to follow the actors from discourse, but this is now fixed with the latest commit.

Also, the logs for this action are not showing in the plugin records, interesting.

---

<div class="post-metadata">

### Author: ![ayr-ton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ayr-ton/32/534014_2.png) [@ayr-ton](https://meta.discourse.org/u/ayr-ton)
#### Post date: [December 15, 2025, 7:21pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/6 "2025-12-15T19:21:33Z")

</div>

For testing, you can try linking your profile to [ayr-ton.net](http://ayr-ton.net) or alquimidia.social.br and you will see the same errors. If the login appears the user-agent is being sent through the profile configuration as well.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 15, 2025, 7:32pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/7 "2025-12-15T19:32:44Z")

</div>

Thanks, it should be addressed once this gets merged:

[https://github.com/discourse/discourse-activity-pub/pull/269](https://github.com/discourse/discourse-activity-pub/pull/269)

---

<div class="post-metadata">

### Author: ![ayr-ton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ayr-ton/32/534014_2.png) [@ayr-ton](https://meta.discourse.org/u/ayr-ton)
#### Post date: [December 16, 2025, 8:56pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/8 "2025-12-16T20:56:25Z")

</div>

Amazing, the user-agent is fixed! 💪

Only error I’m seeing now (gotososocial instances, mastodon ones are working as expected in all scenarios):

> invalid\_request Bad Request: redirect\_uri was not set in the token request form

Do you think this is a good first PR for me?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 16, 2025, 10:20pm UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/9 "2025-12-16T22:20:07Z")

</div>

Sure, please do submit a PR, thanks!

---

<div class="post-metadata">

### Author: ![ayr-ton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ayr-ton/32/534014_2.png) [@ayr-ton](https://meta.discourse.org/u/ayr-ton)
#### Post date: [March 18, 2026, 4:05am UTC](https://meta.discourse.org/t/activitypub-no-user-agent-sent-with-request-failure-while-creating-client/391245/10 "2026-03-18T04:05:51Z")

</div>

Just flagged your post by accident instead clicking reply, sorry.

Btw, just in time for Christmas (in 2026):

[github.com/discourse/discourse-activity-pub/pull/294](http://github.com/discourse/discourse-activity-pub/pull/294)
