App and Solution

Get Started with Apps and Solutions

13min
before you start prerequisites understand the app and solutions concept you must have your access token you, as a developer, must belong to a team that owns an app and an organization that owns a solution you can use getorganizationsassigned to retrieve a list of organizations and teams to which you belong set up your api suite in postman or another api client get access token you'll need an access token before starting the registration process for your app or solution to generate an access token, you must create a postman oauth2 0 client the steps below will guide you through setting up postman and obtaining your access token step 1 download and import developer api postman collection postman collection updates you can download the latest version of the developer api postman collection here download the latest developer api postman collection and environment file below https //archbee doc uploads s3 amazonaws com/pyxrbttf6wzpvekyaklwu/sdmqontmwgwz17qnfqeed app and solution api v231postmancollection json https //archbee doc uploads s3 amazonaws com/pyxrbttf6wzpvekyaklwu/hgyzclf0ygiqpkdeutoeq apps and solns apispostmanenvironment json step 2 import the collection and environment file open postman application and go to collections > import in the dialog box, click files and select the developer api postman collection json file you just downloaded once you've imported the file, you should see the latest version of the developer api collection next, go to environments > import > files and select the apps api postmant environemnt json file this imports the environment variables that you'll use for the collection the environment file includes the following hardcoded variables {{baseurl}} https //api os1 dev {{authurl}} https //auth dlv2 sandbox getos1 com/auth/realms/developerplatform/protocol/openid connect/auth https //auth dlv2 sandbox getos1 com/auth/realms/developerplatform/protocol/openid connect/auth {{clientid}} app developerplatform step 3 generate access token click on the root folder of the developer portal apis and select the authorization tab select the type as oauth 2 0 and fill out the details from the table below field value type oauth 2 0 token name access token name to save in postman grant type implicit callback url none auth url {{authurl}} client id {{clientid}} scope none state none client authentication send client credentials in body click get access token to be routed to your organization login you'll be routed back to postman with your access token step 4 set the access token to the {{dptoken}} variable click use token click the token and select all and click set as variable set it to the environment variable to {{dptoken}} note always ensure your access token and other sensitive information are kept confidential avoid sharing them or posting them in public forums step 5 retrieve your orgid and teamid to register your app and soln, you'll l need your orgid and teamid ensure you include the following header values in the authentication tab x developerplatform request id \[ your request id] x developerplatform access \[your access token] 1 call the portal api endpoint call getorganizationsassigned 2 retrieve your orgid and teamid from the response once you've sent the request, the api will return a list of organizations and teams you are a member of from this list identify and note down the orgid for your desired organization similarly, locate the teamid for your specific team within that organization add your teamid and orgid to the apps & solns apis environment to use in subsequent api calls example payload { "data" { "organizations" \[ { "name" "delhivery", "orgid" "ac1582ea 3a2d 47a2 9aa5 4cf90c0e1e5d", "teams" \[ { "teamid" "d3d17d44 572a 45a1 8b6e 9f8185ce1c8d", "name" "del team1" }, { "teamid" "f762a888 c349 43e7 8e17 7248b7f4d132", "name" "del team2" } ] } ] }, "request" { "url" "/app/portal api/organization/assigned", "method" "get", "params" {}, "query" {}, "body" {} } } next steps now that you have your access token, set up your developer access with postman, and retrieved your teamid and orgid , you're ready to register your app and solution