Skip to content

Call Runtime API using Access Token #2070

@rachaelhouse

Description

@rachaelhouse

What is the expected feature or enhancement?

The runtime API currently accepts either an apiKey or bearer access token for authorization.
In the future the API would like to only accept access tokens for authorization.

To make this transition we should update the client so that we call the IBM cloud API to exchange the provided API key for an access token. This access token can then be passed to the runtime API.
The access token would be passed in the Authorization header with the bearer key word. For example
Authorization: bearer MY_ACCESS_TOKEN

The following API from IBM cloud should be used to generate the access token from the API key https://test.cloud.ibm.com/apidocs/iam-identity-token-api#gettoken-apikey

This change would be for the cloud channel.

Acceptance criteria

  • User can continue to pass the QiskitRuntimeService an API key for the cloud channel
  • The requests made to the runtime API use an access token for authorization not apiKey

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions