Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API-7827]: Stop using url parameters to authenticate Score API requests #114

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

esingin-sift
Copy link
Contributor

Purpose

Summary

Call Sift endpoints with Basic Authentication instead of sending api_key as a request parameter.
Applied to the following calls:
Anthropic raised a concern about our sift-python SDK logging api keys when an exception occurs. This affects these calls:

  • Score (client.score() in sift-python)
  • Get Score (client.get_user_score() )
  • Rescore User (client.rescore_user())
  • Unlabel (client.unlabel())

Testing

  • Unit Tests
  • Integration testing app

Checklist

  • The change was thoroughly tested manually
  • The change was covered with unit tests
  • The change was tested with real API calls (if applicable)
  • Necessary changes were made in the integration tests (if applicable)
  • New functionality is reflected in README

…ore API requests

- updated client.get_user_score()
…ore API requests

- updated client.score() to use Basic Authentication
…ore API requests

- updated client.score() to use Basic Authentication
…ore API requests

- updated client.rescore_user() to use Basic Authentication
…ore API requests

- updated client.rescore_user() to use Basic Authentication
Copy link
Contributor

@sbogolii-sift sbogolii-sift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esingin-sift esingin-sift merged commit a2ba885 into master Oct 8, 2024
2 checks passed
@esingin-sift esingin-sift deleted the API-7827 branch October 8, 2024 10:21
@esingin-sift esingin-sift mentioned this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants