Closed DerManoMann closed 7 years ago
Hi there, I am trying to add a user to an organization as per https://developer.zendesk.com/rest_api/docs/core/organization_memberships#create-membership
However, I am getting a `422 Unprocessable Entity back from the API with these details:
`422 Unprocessable Entity
{"error":"RecordInvalid","description":"Record validation errors","details":{"organization":[{"description":"Organizatio (truncated...) [details] {"error":"RecordInvalid","description":"Record validation errors","details":{"organization":[{"description":"Organization cannot be blank","error":"BlankValue"}]}}
Here are the relevant bits of my code:
$client = new ZendeskClient($subdomain); $client->setAuth(Auth::BASIC, ['username' => $username, 'token' => $token]); $org = $client->users(123)->organizationMemberships()->create([ 'user_id' => 123, 'organization_id' => 456, ]);
The API user (123) has admin rights and organization_id 456 does exist.
nvm - confused id and organization_id
Hi there, I am trying to add a user to an organization as per https://developer.zendesk.com/rest_api/docs/core/organization_memberships#create-membership
However, I am getting a
`422 Unprocessable Entity
back from the API with these details:Here are the relevant bits of my code:
The API user (123) has admin rights and organization_id 456 does exist.