Comments (2)
Hi @lekiend
The error that you have mentioned seems like an incorrect people resource name.
I tried the code snippet as such:
function addPersonInExistingHangoutSpace($client) {
$userId = ""; // people resource id like 100000033......
$service = new HangoutsChat($client);
$space = new Google\Service\HangoutsChat\Space(["displayName" => "My space", "spaceType" => "SPACE"]);
$membership1 = new Google\Service\HangoutsChat\Membership(["member" => ["name" => "users/$userId", "type" => "HUMAN"]] );
$SetUpSpaceRequest = new Google\Service\HangoutsChat\SetUpSpaceRequest(["space" => $space, "memberships" => [$membership1]]);
$space = $service->spaces->setup( $SetUpSpaceRequest );
}
This created the space and added the person to space.
One thing to note here is that the user is in my contacts. Please confirm if this is the case or not.
from google-api-php-client-services.
Hello,
In the first part of my code, $resourceName is returned correctly. I just replace "people" with "users" to fit the documentation.
Anyway, I discover that it is possible only with internal users. It is not possible to use the Chat API with external users.
Because of those restrictions, I moved to Telegram chat with less restrictions and a lot easier to use.
Regards
from google-api-php-client-services.
Related Issues (20)
- BusinessProfilePerformance: Google \ Exception (fetchMultiDailyMetricsTimeSeries) unknown parameter: 'dailyRange' HOT 3
- \Google\Service\Calendar\Event::getDescription() returns NULL instead of "" HOT 3
- chore: update copyright year
- Slow download time impacting our tests. HOT 2
- composer install fails while trying to download "google/apiclient-services" everytime for the last three weeks (duplicate by mistake)
- composer install fails while trying to download "google/apiclient-services" everytime for the last three weeks HOT 6
- Obtain Domains list HOT 1
- Package is difficult to install HOT 1
- User does not have sufficient permissions for this profile. HOT 2
- Send push notification to multiple device in single request HOT 3
- `ValueRange:getValues()` returns null for empty sheet. HOT 3
- Dynamic property declarations in PHP 8.2 HOT 1
- Method: verificationTokens.generate missing in MyBusinessVerifications HOT 4
- Dynamic property declarations in PHP 8.2 (follow-up) HOT 4
- getResources() now returns null
- Add `@throws \Google\Service\Exception` in method's phpdoc HOT 2
- Safe browsing client refers to non existent v5 version HOT 5
- TransitType enum not generated HOT 4
- Hey, I’ve been working with Swoole and I think there’s an issue when the application runs in a resident memory environment
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 google-api-php-client-services.