Skip to content

How to use REST API to set user profile status? #108473

Discussion options

You must be logged in to vote

You can't do it in the REST API, but via GraphQL. Using the GitHub CLI, you could do something like this:

emoji=':juggling_person:'
status='This is my status'

gh api graphql \
    --raw-field emoji="$emoji" \
    --raw-field status="$status" \
    --raw-field query='
        mutation UpdateStatus($emoji: String!, $status: String!) {
          changeUserStatus(input:{emoji: $emoji, message: $status}) {
            clientMutationId
            status {
              emoji
              message
              updatedAt
              user {
                login
              }
            }
          }
        }
    '

There's also an extension to the GitHub CLI for specifically this: gh-user…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@UlyssesZh
Comment options

Answer selected by UlyssesZh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions and conversations related to APIs or Webhooks Question
2 participants