arazzo: 1.0.1
info:
title: Meta Update Current User Profile
summary: Resolve the current user, update their profile, then read it back to confirm.
description: >-
A read-after-write pattern against the User node. The workflow resolves the
authenticated user with /me, posts an update to that user node, and then
re-reads the user to confirm the new values persisted. The Graph API User
update accepts a free-form object of writable fields, so the update payload
is supplied by the caller. Every step inlines its request so the flow can be
read and executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: usersApi
url: ../openapi/meta-users-api-openapi.yml
type: openapi
workflows:
- workflowId: update-current-user-profile
summary: Update the authenticated user's profile and verify the change.
description: >-
Resolves the current user id, applies a profile update, and re-reads the
user node to confirm the write.
inputs:
type: object
required:
- accessToken
- updates
properties:
accessToken:
type: string
description: A Meta Graph API user access token.
updates:
type: object
description: Map of writable User fields to update (e.g. name, local news settings).
fields:
type: string
description: Comma-separated list of fields to read back after the update.
steps:
- stepId: getCurrentUser
description: >-
Resolve the authenticated user's id from the access token.
operationId: getMe
parameters:
- name: access_token
in: query
value: $inputs.accessToken
successCriteria:
- condition: $statusCode == 200
outputs:
userId: $response.body#/id
- stepId: applyUpdate
description: >-
Post the supplied update object to the resolved User node.
operationId: updateUser
parameters:
- name: user-id
in: path
value: $steps.getCurrentUser.outputs.userId
- name: access_token
in: query
value: $inputs.accessToken
requestBody:
contentType: application/json
payload: $inputs.updates
successCriteria:
- condition: $statusCode == 200
outputs:
success: $response.body#/success
- stepId: readBack
description: >-
Re-read the User node to confirm the updated values persisted.
operationId: getUser
parameters:
- name: user-id
in: path
value: $steps.getCurrentUser.outputs.userId
- name: fields
in: query
value: $inputs.fields
- name: access_token
in: query
value: $inputs.accessToken
successCriteria:
- condition: $statusCode == 200
outputs:
userId: $response.body#/id
name: $response.body#/name
outputs:
userId: $steps.getCurrentUser.outputs.userId
updateSucceeded: $steps.applyUpdate.outputs.success
name: $steps.readBack.outputs.name
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.