MollieAPI.Api.OAuthAPI (mollie_api v0.1.0-20260428)
View SourceAPI calls for all endpoints tagged OAuthAPI.
Summary
Functions
Generate tokens Exchange the authorization code you received from the Authorize endpoint for an 'access token' API credential, with which you can communicate with the Mollie API on behalf of the consenting merchant. This endpoint can only be accessed using OAuth client credentials.
Revoke tokens Revoke an access token or refresh token. Once revoked, the token can no longer be used. Revoking a refresh token revokes all access tokens that were created using the same authorization. This endpoint can only be accessed using OAuth client credentials.
Functions
@spec oauth_generate_tokens(Tesla.Env.client(), String.t(), keyword()) :: {:ok, MollieAPI.Model.OauthGenerateTokens200Response.t()} | {:error, Tesla.Env.t()}
Generate tokens Exchange the authorization code you received from the Authorize endpoint for an 'access token' API credential, with which you can communicate with the Mollie API on behalf of the consenting merchant. This endpoint can only be accessed using OAuth client credentials.
Parameters
connection(MollieAPI.Connection): Connection to serverauthorization(String.t): The OAuth client ID and client secret as basic access credentials. Pseudo code:"Basic " + toBase64(client_id + ":" + client_secret)For example:Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==opts(keyword): Optional parameters:"Content-Type"(String.t): This header value must match the type of the request body you send, if there is a request body. For example, if you send the request body as JSON, this header must be set toapplication/json, and if you send it as form encoded you must set this header toapplication/x-www-form-urlencoded.:"idempotency-key"(String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.:body(OauthGenerateTokensRequest):
Returns
{:ok, MollieAPI.Model.OauthGenerateTokens200Response.t}on success{:error, Tesla.Env.t}on failure
@spec oauth_revoke_tokens(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Revoke tokens Revoke an access token or refresh token. Once revoked, the token can no longer be used. Revoking a refresh token revokes all access tokens that were created using the same authorization. This endpoint can only be accessed using OAuth client credentials.
Parameters
connection(MollieAPI.Connection): Connection to serverauthorization(String.t): The OAuth client ID and client secret as basic access credentials. Pseudo code:"Basic " + toBase64(client_id + ":" + client_secret)For example:Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==opts(keyword): Optional parameters:"Content-Type"(String.t): This header value must match the type of the request body you send, if there is a request body. For example, if you send the request body as JSON, this header must be set toapplication/json, and if you send it as form encoded you must set this header toapplication/x-www-form-urlencoded.:"idempotency-key"(String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.:body(OauthRevokeTokensRequest):
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure