Procurement Service Bus Authenticiation and Authorization

The Procurement Service Bus API uses the OAuth2.0 Resource Owner Password Credentials Grant type.

Requesting a bearer token


Accept: application/json
Content-Type: application/x-www-form-urlencoded
Content-Length: 155
Expect: 100-continue


For the production environment use


Specifies the user that is authorized for a specific party.


Specifies that the Access Point functionality is used.


Authenticate your client application




Using the bearer and subscription

The SubscriptionKey provided per organisation is also placed in the header part.

GET{API call} HTTP/1.1
Subscription-Key: {SubscriptionKey}
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZ...pjw

C# example

using IdentityModel.Client;

string identityUrl = ""; // Production: 
string clientId = {ClientId};
string clientSecret = {clientsecret};
string user = {UserName};
string userSecret = {userSecret};
HttpClientHandler clientHandler = new HttpClientHandler();
Task<TokenResponse> accessTokenTask = GetAccessToken(clientHandler, identityUrl
            , ClientId, clientSecret
            , User, UserSecret);
var accessToken = accessTokenTask.GetAwaiter().GetResult();
client = new EConnectPsbApiClient(new EConnectCredentials(accessToken.AccessToken, SubscriptionKey), clientHandler)
    BaseUri = new Uri("") // Production: ""

Package needed: <PackageReference Include=”IdentityModel” Version=”3.10.0″ />

For creating the right headers in the calls we you can use the sample Class EConnectCredentials

public class EConnectCredentials : TokenCredentials
    public string SubscriptionKey { get; }
    public EConnectCredentials(string token, string subscriptionKey) : base(token)
        SubscriptionKey = subscriptionKey;

    public override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        request.Headers.Add("Subscription-Key", SubscriptionKey);
        return base.ProcessHttpRequestAsync(request, cancellationToken);


Was this article helpful?