Skip to content

Commit 6834ad3

Browse files
shohei1029dem108
andauthored
Update articles/machine-learning/how-to-authenticate-online-endpoint.md
Co-authored-by: SeokJin Han <[email protected]>
1 parent 1a4706f commit 6834ad3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

articles/machine-learning/how-to-authenticate-online-endpoint.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ body = str.encode(json.dumps(data))
118118

119119
url = 'https://endpt-auth-token.eastus.inference.ml.azure.com/score'
120120
api_key = '<endpoint_cred>' # Replace this with the key or token you obtained
121+
assert api_key != "<endpoint_cred>", "key should be provided to invoke the endpoint"
121122

122123
headers = {'Content-Type':'application/json', 'Authorization':('Bearer '+ api_key)}
123124

0 commit comments

Comments
 (0)