Skip to content

Add OAuthApi::userInfo() for Storyblok OAuth user info #39

Description

@roberto-butti

Please implement first-class support for the official OAuth user info endpoint:

GET https://api.storyblok.com/oauth/user_info

Docs:
https://www.storyblok.com/docs/api/management/oauth/get-user-info

Context:

The client currently has UserApi::me(), which calls /v1/users/me. That endpoint does not work with OAuth access tokens used by Storyblok space plugins. For plugin OAuth flows, the documented endpoint is https://api.storyblok.com/oauth/user_info.

Requested implementation:

  • Add Storyblok\ManagementApi\Endpoints\OAuthApi.
  • Add method OAuthApi::userInfo().
  • It should call GET /oauth/user_info against https://api.storyblok.com, not the default MAPI base URI.
  • Use the existing ManagementApiClient authorization/header setup.
  • Return a typed response/data object if consistent with existing package patterns.
  • Add tests for successful response parsing and non-2xx handling.
  • Do not change UserApi::me() behavior.

Goal:

Allow consumers using OAuth access tokens, especially Storyblok space plugins, to fetch the authenticated OAuth user info without manually bypassing the PHP client.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions