Comments (1)
I believe there is a method in intercom-php/src/IntercomTags.php
:
/**
* Creates a Tag.
*
* @see https://developers.intercom.io/reference#create-and-update-tags
* @param array $options
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function tag($options)
{
return $this->client->post("tags", $options);
}
Now in v1.4 I can see that tags can be attached like this
<?php
# Note that you can use either id, user_id or email to tag a user.
# You only need to use one per user, e.g. the below will tag
# three users if each identifier is for a different, unique user
$intercom->tags->tag([
"name" => "VIPs",
"users" => [
["id" => "5977e20941abfc5aae4552d1"],
["user_id" => "12345"],
["email" => "[email protected]"]
]
]);
?>
but since I can't find something similar in latest 2.4. I dig a little in the documentation (p.s. I believe there are some issues with the latest documentation):
-
Here
https://developers.intercom.com/intercom-api-reference/reference/create-and-update-tags
there is no reference for a PHP method. -
But in the
https://developers.intercom.com/intercom-api-reference/reference/tag-companies
there is a PHP example for untagging users (obviously, it's classified wrong ).,
Finally, looking at the README there is the
$client->tags->tag([
'name' => 'Test',
'users' => [
['id' => '1234'],
],
]);
Not sure if the above ^^ works though, but it's worth a try. Also, I can see that the method from 1.4 is still available, so if this doesn't work maybe try the first approach.
Hope it helps!
from intercom-php.
Related Issues (20)
- Contacts Resource - Missing Tag Functionality
- 404 on deprecated endpoints HOT 1
- [Feature] Documentation
- Laravel 8 requires Guzzle 7.0.1 HOT 5
- Can not install intercom/intercom-php in laravel 8 HOT 4
- API Should not return 404 on input error
- [Help Center] Article order missing
- Support for passing sort on nextSearch
- Code Climate badge
- Missing "List attached companies" endpoint
- User/lead initiated conversation using email returns 400 bad request
- Exceptions does not provide exception body HOT 2
- could not able to create contact using php api HOT 2
- Detach a contact from specific tags HOT 1
- Fetch conversation's by lead email?
- Autoload the vendor folder from a subfolder
- Manage Conversation API Missing HOT 1
- Missing Message Factory because of latest php-http/message version HOT 3
- Problem installing package with PHP 8.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intercom-php.