Watson: verschil tussen versies

Geen bewerkingssamenvatting
Geen bewerkingssamenvatting
Regel 2: Regel 2:
{{#tag:easytree|
{{#tag:easytree|
Watson
Watson
:To authenticate with a service's API by using an access token, complete the following steps:<ref name="aut">informatie afkomstig van [https://cloud.ibm.com/docs/account?topic=account-iamapikeysforservices IBM]</ref>
:Authenticate
:1 - First, [https://cloud.ibm.com/docs/account?topic=account-userapikey#manage-user-keys create an IBM Cloud API key] if you have not already.
::To authenticate with a service's API by using an access token, complete the following steps:<ref name="aut">informatie afkomstig van [https://cloud.ibm.com/docs/account?topic=account-iamapikeysforservices IBM]</ref>
:2 - The next step for the API client is the retrieval of an IAM access token, as described in [https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey Getting an IAM token from an API key].
::1 - First, [https://cloud.ibm.com/docs/account?topic=account-userapikey#manage-user-keys create an IBM Cloud API key] if you have not already.
:3 - From the response, extract the property <tt>access_token</tt> to get the IAM access token. expires_in indicates the seconds until the IAM access token <tt>access_token</tt> expires. Either use this relative value or the absolute time stamp expiration based in UNIX time.
::2 - The next step for the API client is the retrieval of an IAM access token, as described in [https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey Getting an IAM token from an API key].
:4 - Send the IAM access token as described in [https://tools.ietf.org/html/rfc6750#page-5 RFC 6750, section 2.1. Authorization Request Header Field]:
::3 - From the response, extract the property <tt>access_token</tt> to get the IAM access token. expires_in indicates the seconds until the IAM access token <tt>access_token</tt> expires. Either use this relative value or the absolute time stamp expiration based in UNIX time.
:Review the following example:
::4 - Send the IAM access token as described in [https://tools.ietf.org/html/rfc6750#page-5 RFC 6750, section 2.1. Authorization Request Header Field]:
:1 - Use the HTTP header Authorization
::Review the following example:
:2 - Prefix the IAM access token with the literal Bearer: Bearer eyJhbGciOiJSUzI1Ng...
::1 - Use the HTTP header Authorization
:3 - Add the prefixed IAM access token to the HTTP header: Authorization: Bearer eyJhbGciOiJSUzI1Ng....
::2 - Prefix the IAM access token with the literal Bearer: Bearer eyJhbGciOiJSUzI1Ng...
:<references/>
::3 - Add the prefixed IAM access token to the HTTP header: Authorization: Bearer eyJhbGciOiJSUzI1Ng....
::<references/>
:{{#tag:easyview|https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=ui#userapikey|type=iframe|direct=true|thumbnail=Managing user API keys}}
}}
}}
[[Categorie:Webdesign:Watson]]
[[Categorie:Webdesign:Watson]]

Versie van 16 aug 2021 16:23

Terug naar Webdesign